input: Write a function to convert an SQL query into a Python program that establishes a connection to a database, executes the query, and outputs the results. The function should take the SQL query string as input and return the output of the query.
  
  
  def sql_to_python(sql_query):
      import datetime, pyodbc
  
      # 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()
  
      # Return the results
      return [result for result in results]
  
  # Test cases
  assert sql_to_python("SELECT * FROM orders") == [(1, "2020-01-01"), (2, "2020-02-01")]
  assert sql_to_python("SELECT name, price FROM products") == [("product1", 10), ("product2", 20)]
  assert sql_to_python("SELECT * FROM customers") == [(1, "John"), (2, "Jane")]
  assert sql_to_python("SELECT * FROM orders") != [(1, "2019-01-01"), (2, "2019-02-01")]
  
output: def sql_to_python(sql_query):
      import pyodbc
  
      # Establish a connection to the database
      conn = pyodbc.connect("<connection details>")
      cursor = conn.cursor()
  
      # Execute the query
      cursor.execute(sql_query)
      results = cursor.fetchall()
  
      # Return the results
      return [result for result in results]