input: Write a function to modify the given Python code to handle errors appropriately. The function should include a `try-except` block to catch `FileNotFoundError` and `json.decoder.JSONDecodeError`. If a `FileNotFoundError` is encountered, it should print "The file specified does not exist." If a `json.decoder.JSONDecodeError` is encountered, it should print "The file specified is not in a valid JSON format." The function should have the following header: `def read_data_from_json(filename)`.
  
  assert read_data_from_json("nonexistent_file.json")=="The file specified does not exist."
  assert read_data_from_json("invalid_json_file.json")=="The file specified is not in a valid JSON format."
  assert read_data_from_json("valid_json_file.json")=={"key": "value"}
output: def read_data_from_json(filename):
      try:
          with open(filename, 'r') as file:
              data = json.load(file)
              return data
      except FileNotFoundError:
          return "The file specified does not exist."
      except json.decoder.JSONDecodeError:
          return "The file specified is not in a valid JSON format."