input: Write a function to convert the given SQL query into a Python program. The function should establish a connection to the database using pyodbc, execute the query, and print the results. If the connection details are not provided, the function should raise an error.
  
  
  def convert_sql_to_python(sql_query, connection_details):
      import datetime, pyodbc
  
      # Validate connection details
      if not connection_details:
          raise ValueError("Connection details are required.")
  
      # Establish a connection to the database
      conn = pyodbc.connect(connection_details)
      cursor = conn.cursor()
  
      # Get the year of the order date
      query_date = datetime.date.today().year
      where_clause = "WHERE YEAR(order_date) = ?"
  
      # Execute the query
      cursor.execute(sql_query + " " + where_clause, query_date)
      results = cursor.fetchall()
  
      # Output the results
      for result in results:
          print(result)
  
  assert convert_sql_to_python("SELECT * FROM orders", "<connection details>") is None
  assert convert_sql_to_python("SELECT * FROM orders", "") == ValueError("Connection details are required.")
  
output: def convert_sql_to_python(sql_query, connection_details):
      import datetime, pyodbc
  
      if not connection_details:
          raise ValueError("Connection details are required.")
  
      conn = pyodbc.connect(connection_details)
      cursor = conn.cursor()
  
      query_date = datetime.date.today().year
      where_clause = "WHERE YEAR(order_date) = ?"
  
      cursor.execute(sql_query + " " + where_clause, query_date)
      results = cursor.fetchall()
  
      for result in results:
          print(result)