input: Write a function to re-write a given SQL query in Python. The function should take no arguments, connect to a SQLite database named 'movies.db', execute a query to fetch all records from the 'Movies' table where the 'category' is 'horror', and print each row of the result.
  
  
  def fetch_horror_movies():
      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 fetch_horror_movies() # should print rows where category is 'horror'
  assert fetch_horror_movies() # should print rows where category is 'horror'
output: def fetch_horror_movies():
      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()