input: Write a function to convert a given SQL query into a Python program. The function should take a SQL query and a connection details string as input, and execute the query using the pyodbc library. It should then print the results of the query. The SQL query in the input will always have a WHERE clause that filters by the year of the order date. If the SQL query has a different structure, the function should raise a ValueError.
  assert convert_sql_to_python("""SELECT * FROM orders WHERE YEAR(order_date) = 2020""", "<connection details>") is None
  assert convert_sql_to_python("""SELECT * FROM orders WHERE order_date = '2020-01-01'""", "<connection details>") is None
  assert convert_sql_to_python("""SELECT * FROM orders WHERE YEAR(order_date) = 2021""", "<connection details>") is None
  assert convert_sql_to_python("""SELECT * FROM orders WHERE YEAR(order_date) = 2022""", "<connection details>") is None
  assert convert_sql_to_python("""SELECT * FROM orders WHERE YEAR(order_date) = 2023""", "<connection details>") is None
output: def convert_sql_to_python(sql_query, connection_details):
      if "WHERE YEAR(order_date)" not in sql_query:
          raise ValueError("The SQL query must have a WHERE clause that filters by the year of the order date.")
      
      import pyodbc
      conn = pyodbc.connect(connection_details)
      cursor = conn.cursor()
      cursor.execute(sql_query)
      results = cursor.fetchall()
      for row in results:
          print(row)
      conn.close()