input: Write a function to modify the given Python code to handle errors. The function should return the data read from the JSON file, but if there is a FileNotFoundError, it should print "The file specified does not exist." If the file is not in a valid JSON format, it should print "The file specified is not in a valid JSON format." The function should have the following signature: def read_data_from_json(filename).
  assert read_data_from_json("valid.json")=={"key": "value"}
  assert read_data_from_json("invalid.json")==None
  assert read_data_from_json("nonexistent.json")==None
  
  def read_data_from_json(filename):
      try:
          with open(filename, 'r') as f:
              data = json.load(f)
          return data
      except FileNotFoundError:
          print("The file specified does not exist.")
          return None
      except json.decoder.JSONDecodeError:
          print("The file specified is not in a valid JSON format.")
          return None
output: def read_data_from_json(filename):
      try:
          with open(filename, 'r') as f:
              data = json.load(f)
          return data
      except FileNotFoundError:
          print("The file specified does not exist.")
          return None
      except json.decoder.JSONDecodeError:
          print("The file specified is not in a valid JSON format.")
          return None