input: Write a function to convert a given SQL statement into a Python Pandas DataFrame. The function should take a SQL statement and a connection object as input and return a Pandas DataFrame. If the connection object is not provided, the function should raise a ValueError.
  def sql_to_pandas(sql_statement, conn=None):
      if not conn:
          raise ValueError("Connection object is required")
      import pandas as pd
      df = pd.read_sql_query(sql_statement, conn)
      return df
  assert isinstance(sql_to_pandas("SELECT * FROM book;", conn), pd.DataFrame)
  assert sql_to_pandas("SELECT * FROM book;", conn).empty==False
  assert sql_to_pandas("", conn)==None
  assert sql_to_pandas("SELECT * FROM book;", None)
output: def sql_to_pandas(sql_statement, conn=None):
      if not conn:
          raise ValueError("Connection object is required")
      import pandas as pd
      if not sql_statement:
          return None
      df = pd.read_sql_query(sql_statement, conn)
      return df