input: Write a function named read_data_from_json that modifies the provided Python code to handle errors when reading data from a JSON file. The function should print appropriate error messages for when the specified file does not exist or when the file is not in a valid JSON format. If the file is read successfully, the function should return the data.
  assert read_data_from_json("existing_file.json")=={'key': 'value'}
  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."
output: def read_data_from_json(file_path):
      try:
          with open(file_path, 'r') as file:
              data = json.load(file)
              return data
      except FileNotFoundError:
          return "The file specified does not exist."
      except json.JSONDecodeError:
          return "The file specified is not in a valid JSON format."