input: def refactor_sql_to_python(query: str) -> str:
      """
      Re-write the given SQL query into a Python script that uses SQLite3 to connect to a database and execute the query.
  
      >>> refactor_sql_to_python("SELECT * FROM Movies WHERE category = 'horror';")
      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()
      """
output:     import sqlite3
  
      conn = sqlite3.connect('movies.db') 
      cursor = conn.cursor()
  
      cursor.execute(query)
  
      result = cursor.fetchall()
      for row in result:
          print(row)
  
      conn.close()