input: Write a function to convert the given SQL query into a Python program. The function should establish a connection to the database, execute the query, and print the results. The function should take the SQL query and the year as inputs.
  
  def convert_sql_to_python(sql_query, query_year):
      import datetime, pyodbc
  
      # Establish a connection to the database
      conn = pyodbc.connect("<connection details>")
      cursor = conn.cursor()
  
      # Get the year of the order date
      where_clause = "WHERE YEAR(order_date) = ?"
  
      # Execute the query
      cursor.execute(sql_query + " " + where_clause, query_year)
      results = cursor.fetchall()
  
      # Output the results
      for result in results:
          print(result)
  
  assert convert_sql_to_python("SELECT * FROM orders", 2020)
output: def convert_sql_to_python(sql_query, 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, query_year)
      results = cursor.fetchall()
  
      for result in results:
          print(result)