input: Write a function to convert a given SQL query into a Python program that executes the query and prints the results. The function should accept a SQL query string and a year parameter. The SQL query will always be of the form "SELECT * FROM <table_name>" with a WHERE clause that filters based on the year of an order_date column. The function should return a list of all results from the database query.
  
  def sql_to_python(sql_query, year):
      import datetime, pyodbc
  
      # Establish a connection to the database
      conn = pyodbc.connect("<connection details>")
      cursor = conn.cursor()
  
      # Modify the SQL query to include the WHERE clause
      where_clause = "WHERE YEAR(order_date) = ?"
  
      # Execute the query
      cursor.execute(sql_query + " " + where_clause, year)
      results = cursor.fetchall()
  
      # Close the connection
      conn.close()
  
      return results
  
  assert sql_to_python("SELECT * FROM orders", 2020) == [('order1', '2020-01-01'), ('order2', '2020-02-01')]
  assert sql_to_python("SELECT * FROM orders", 2019) == [('order3', '2019-01-01')]
  assert sql_to_python("SELECT * FROM orders", 2021) == []
output: def sql_to_python(sql_query, year):
      import datetime, pyodbc
  
      conn = pyodbc.connect("<connection details>")
      cursor = conn.cursor()
  
      where_clause = "WHERE YEAR(order_date) = ?"
  
      cursor.execute(sql_query + " " + where_clause, year)
      results = cursor.fetchall()
  
      conn.close()
  
      return results