input: from typing import List
  
  
  def transform_sql_to_python(sql_query: str, target_year: int) -> str:
      """ Converts a given SQL query into a Python program that executes the query using pyodbc.
      The SQL query is expected to filter records by a specific year.
      The resulting Python script will execute the corresponding query and print out the results.
      >>> transform_sql_to_python("SELECT * FROM orders WHERE YEAR(order_date) = 2020", 2020)
      'import datetime, pyodbc\\n\\n# Establish a connection to the database\\nconn = pyodbc.connect(\\"<connection details>\\")\\ncursor = conn.cursor()\\n\\n# Get the year of the order date\\nsql = \\"SELECT * FROM orders\\"\\nquery_date = {target_year}\\nwhere_clause = \\"WHERE YEAR(order_date) = ?\\"\\n\\n# Execute the query\\ncursor.execute(sql + \\" \\" + where_clause, query_date)\\nresults = cursor.fetchall()\\n\\n# Output the results\\nfor result in results:\\n    print(result)'
      """
      output_template = """
  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 = "{sql}"
  query_date = {target_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)
  """
      return output_template.format(sql="SELECT * FROM orders", target_year=target_year)
output:     output_template = """
  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 = "{sql}"
  query_date = {target_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)
  """
      return output_template.format(sql=sql_query.split("WHERE")[0].strip(), target_year=target_year)