input: Write a function to rewrite a given SQL query in Python. The function should take a SQL query as a string and return the corresponding Python code that performs the same operation on a SQLite database. Ensure that the function includes the necessary steps to connect to the database, execute the query, fetch the results, and print them.
  assert rewrite_sql_in_python("SELECT * FROM Movies WHERE category = 'horror'")=='import sqlite3\\n\\nconn = sqlite3.connect(\'movies.db\')\\ncursor = conn.cursor()\\n\\ncursor.execute(\"SELECT * FROM Movies WHERE category = \'horror\'\")\\n\\nresult = cursor.fetchall()\\nfor row in result:\\n\\tprint(row)\\n\\nconn.close()'
  assert rewrite_sql_in_python("SELECT name, year FROM Movies WHERE year > 2000")=='import sqlite3\\n\\nconn = sqlite3.connect(\'movies.db\')\\ncursor = conn.cursor()\\n\\ncursor.execute(\"SELECT name, year FROM Movies WHERE year > 2000\")\\n\\nresult = cursor.fetchall()\\nfor row in result:\\n\\tprint(row)\\n\\nconn.close()'
  assert rewrite_sql_in_python("")==''
output: def rewrite_sql_in_python(sql_query):
      if not sql_query:
          return ''
      return f'import sqlite3\n\nconn = sqlite3.connect(\'movies.db\')\ncursor = conn.cursor()\n\ncursor.execute(\"{sql_query}\")\n\nresult = cursor.fetchall()\nfor row in result:\n\tprint(row)\n\nconn.close()'