input: Write a function to modify the given Python code to handle errors. The function should attempt to read a JSON file and handle the cases where the file does not exist or the file content is not in a valid JSON format. If the file does not exist, the function should print "The file specified does not exist." If the content is not valid JSON, it should print "The file specified is not in a valid JSON format."
  
  assert read_data_from_json("existing_file.json")==data
  assert read_data_from_json("nonexistent_file.json")=="The file specified does not exist."
  assert read_data_from_json("invalid_format_file.json")=="The file specified is not in a valid JSON format."
  
  def read_data_from_json(filename):
      try:
          with open(filename, 'r') as f:
              data = json.load(f)
          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."
output: def read_data_from_json(filename):
      try:
          with open(filename, 'r') as f:
              data = json.load(f)
          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."