input: Write a function to rewrite an SQL query in Python. The function should take in an SQL query as a string and return the corresponding Python code that executes the query on a SQLite database named 'movies.db'. If the query is empty, return an empty string.
  sql_query = "SELECT * FROM Movies WHERE category = 'horror';"
  assert sql_query_to_python(sql_query) == ("""import sqlite3
  
  conn = sqlite3.connect('movies.db') 
  cursor = conn.cursor()
  
  cursor.execute("SELECT * FROM Movies WHERE category = 'horror'")
  
  result = cursor.fetchall()
  for row in result:
      print(row)
  
  conn.close()""")
  assert sql_query_to_python("") == ""
output: def sql_query_to_python(sql_query):
      if not sql_query:
          return ""
      return f"""import sqlite3
  
  conn = sqlite3.connect('movies.db') 
  cursor = conn.cursor()
  
  cursor.execute("{sql_query}")
  
  result = cursor.fetchall()
  for row in result:
      print(row)
  
  conn.close()"""