input: Write a function to convert the given SQL query into a Python program. The SQL query selects all records from the `orders` table where the `order_date` year is 2020. The Python program should establish a connection to the database, execute the query, and print the results.
  
  
  import datetime, pyodbc
  
  def convert_sql_to_python():
      # 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 = 2020
      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)
  
  # Assertion to check if the function runs without errors
  try:
      convert_sql_to_python()
      assert True
  except Exception as e:
      assert False
  
output: def convert_sql_to_python():
      conn = pyodbc.connect("<connection details>")
      cursor = conn.cursor()
      sql = "SELECT * FROM orders"
      query_date = 2020
      where_clause = "WHERE YEAR(order_date) = ?"
      cursor.execute(sql + " " + where_clause, query_date)
      results = cursor.fetchall()
      for result in results:
          print(result)