input: Write a function to convert a given SQL query into a Python program. The function should accept the SQL query as a string and the desired year as an integer, and output the results of the query executed with the specified year condition.
  
  def sql_to_python(sql_query, year):
      import datetime, pyodbc
      
      # Establish a connection to the database
      conn = pyodbc.connect("<connection details>")
      cursor = conn.cursor()
      
      # Append the WHERE clause to the SQL query with the provided year
      where_clause = f"WHERE YEAR(order_date) = {year}"
      full_query = sql_query + " " + where_clause
      
      # Execute the query
      cursor.execute(full_query)
      results = cursor.fetchall()
      
      # Output the results
      for result in results:
          print(result)
  
  assert sql_to_python("SELECT * FROM orders", 2020) is not None
output: def sql_to_python(sql_query, year):
      import datetime, pyodbc
      
      conn = pyodbc.connect("<connection details>")
      cursor = conn.cursor()
      
      where_clause = f"WHERE YEAR(order_date) = {year}"
      full_query = sql_query + " " + where_clause
      
      cursor.execute(full_query)
      results = cursor.fetchall()
      
      return results