input: Write a function to modify the given Python code to handle errors. The function should attempt to read data from a JSON file, and if it encounters a `FileNotFoundError`, it should print "The file specified does not exist." If it encounters a `JSONDecodeError`, it should print "The file specified is not in a valid JSON format."
  
   python
  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.")
      except json.decoder.JSONDecodeError:
          print("The file specified is not in a valid JSON format.")
  
  
  ### Test Cases:
  assert read_data_from_json("nonexistent_file.json") is None
  assert read_data_from_json("invalid_format.json") is 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.")
      except json.decoder.JSONDecodeError:
          print("The file specified is not in a valid JSON format.")