input: Write a function to convert an SQL query to a Python program that retrieves records from a database. The SQL query selects all columns from a table named `orders` where the `order_date` falls in the year 2020. The Python program should establish a connection to the database, execute the query, and print the results.
  
  def convert_sql_to_python(connection_details, table_name='orders', query_year=2020):
      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 = f"SELECT * FROM {table_name}"
      where_clause = f"WHERE YEAR(order_date) = ?"
  
      # Execute the query
      cursor.execute(sql + " " + where_clause, query_year)
      results = cursor.fetchall()
  
      # Output the results
      for result in results:
          print(result)
  
  assert convert_sql_to_python("<connection details>")
  assert convert_sql_to_python("<connection details>", 'new_orders', 2021)
output: def convert_sql_to_python(connection_details, table_name='orders', query_year=2020):
      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 = f"SELECT * FROM {table_name}"
      where_clause = f"WHERE YEAR(order_date) = ?"
  
      # Execute the query
      cursor.execute(sql + " " + where_clause, query_year)
      results = cursor.fetchall()
  
      # Output the results
      for result in results:
          print(result)