input: Write a python function to fetch JSON data from a URL and save it to a file.
  assert fetch_and_save_json('https://example.com', 'output.json') is None
  assert fetch_and_save_json('https://jsonplaceholder.typicode.com/todos/1', 'todo.json') is None
output: import requests
  import json
  
  def fetch_and_save_json(url, filename):
      response = requests.get(url)
      data = response.json()
      with open(filename, 'w') as file:
          json.dump(data, file)