input: from typing import Optional
  
  def sql_to_pandas(sql_query: str, conn: Optional = None) -> pd.DataFrame:
      """ Convert a given SQL query into a Python Pandas DataFrame.
      >>> sql_to_pandas("SELECT * FROM book;", conn)
          column1  column2  column3
      0        1        2        3
      1        4        5        6
      """
output:     import pandas as pd
      if conn is None:
          raise ValueError("Database connection object is required.")
      return pd.read_sql(sql_query, conn)