input: Write a function to convert a given SQL query into a Python program. The function should establish a connection to a database using pyodbc, execute the query, and print the results.
  assert convert_sql_to_python("SELECT * FROM orders\nWHERE YEAR(order_date) = 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 = "SELECT * FROM orders"
  query_date = datetime.date.today().year
  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)'''
  assert convert_sql_to_python("SELECT name FROM customers\nWHERE region = 'North'")==\
  '''import pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Execute the query
  sql = "SELECT name FROM customers"
  where_clause = "WHERE region = ?"
  cursor.execute(sql + " " + where_clause, 'North')
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)'''
  assert convert_sql_to_python("SELECT price FROM products\nWHERE category = 'Electronics'")==\
  '''import pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Execute the query
  sql = "SELECT price FROM products"
  where_clause = "WHERE category = ?"
  cursor.execute(sql + " " + where_clause, 'Electronics')
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)'''
  assert convert_sql_to_python("SELECT * FROM sales\nWHERE YEAR(sale_date) = 2021")==\
  '''import datetime, pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Get the year of the sale date
  sql = "SELECT * FROM sales"
  query_date = datetime.date.today().year
  where_clause = "WHERE YEAR(sale_date) = ?"
  
  # Execute the query
  cursor.execute(sql + " " + where_clause, query_date)
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)'''
  assert convert_sql_to_python("SELECT id FROM orders\nWHERE status = 'paid'")==\
  '''import pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Execute the query
  sql = "SELECT id FROM orders"
  where_clause = "WHERE status = ?"
  cursor.execute(sql + " " + where_clause, 'paid')
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)'''
output: import pyodbc
  
  # Establish a connection to the database
  conn = pyodbc.connect("<connection details>")
  cursor = conn.cursor()
  
  # Execute the query
  sql = "SELECT * FROM orders"
  where_clause = "WHERE YEAR(order_date) = ?"
  cursor.execute(sql + " " + where_clause, 2020)
  results = cursor.fetchall()
  
  # Output the results
  for result in results:
      print(result)