input: Write a function that converts an SQL query into a Python program. The function should take an SQL query string as input and return a Python program as output. The SQL query should be embedded into a Python script that connects to a database, executes the query, and prints the results.
  
  def sql_to_python(sql_query):
      python_code = f'''
  import datetime, pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Get the year of the order date
  sql = "{sql_query}"
  query_date = datetime.date.today().year
  where_clause = "WHERE YEAR(order_date) = ?"
  
  # Execute the query
  cursor.execute(sql + " " + where_clause, query_date)
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)
  '''
      return python_code
  
  assert sql_to_python("SELECT * FROM orders")=='''
  import datetime, pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Get the year of the order date
  sql = "SELECT * FROM orders"
  query_date = datetime.date.today().year
  where_clause = "WHERE YEAR(order_date) = ?"
  
  # Execute the query
  cursor.execute(sql + " " + where_clause, query_date)
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)
  '''
  assert sql_to_python("SELECT item, price FROM products")=='''
  import datetime, pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Get the year of the order date
  sql = "SELECT item, price FROM products"
  query_date = datetime.date.today().year
  where_clause = "WHERE YEAR(order_date) = ?"
  
  # Execute the query
  cursor.execute(sql + " " + where_clause, query_date)
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)
  '''
  assert sql_to_python("")=='''
  import datetime, pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Get the year of the order date
  sql = ""
  query_date = datetime.date.today().year
  where_clause = "WHERE YEAR(order_date) = ?"
  
  # Execute the query
  cursor.execute(sql + " " + where_clause, query_date)
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)
  '''
output: def sql_to_python(sql_query):
      python_code = f'''
  import datetime, pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Get the year of the order date
  sql = "{sql_query}"
  query_date = datetime.date.today().year
  where_clause = "WHERE YEAR(order_date) = ?"
  
  # Execute the query
  cursor.execute(sql + " " + where_clause, query_date)
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)
  '''
      return python_code