input: Write a function to modify the following Python code to handle errors. Specifically, the function should handle FileNotFoundError and JSONDecodeError. The function takes a filename as input, reads the file assuming it is in JSON format, and returns the data if the file exists and is in a valid JSON format. If the file does not exist, it should print "The file specified does not exist." If the JSON decoding fails, it should print "The file specified is not in a valid JSON format." The function should be named read_data_from_json.
  
  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.")
  
  assert read_data_from_json("valid_json.json") == {"key": "value"}
  assert read_data_from_json("non_existent_file.json") is None
  assert read_data_from_json("invalid_json.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.")