input: from typing import Any, Optional, Dict
  
  def read_data_from_json(filename: str) -> Optional[Dict[str, Any]]:
      """Reads data from a JSON file and returns it as a dictionary. If the file does not exist 
      or is not in a valid JSON format, appropriate error messages are printed out.
      
      >>> read_data_from_json('existing_file.json')
      {'key': 'value'}
      >>> read_data_from_json('nonexistent_file.json')
      The file specified does not exist.
      >>> read_data_from_json('invalid_file.json')
      The file specified is not in a valid JSON format.
      """
      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.")
output:     return None