code: def _get_reader(filename: Text, domain: Domain) -> StoryReader:
      if rasa.shared.data.is_likely_yaml_file(filename):
          return YAMLStoryReader(domain, filename)
      else:
          # This is a use case for uploading the story over REST API.
          # The source file has a random name.
          return _guess_reader(filename, domain)
  
file_path: rasa/rasa/shared/core/training_data/loading.py
imports: import logging
  import os
  from typing import Text, Optional, List, Union
  import rasa.shared.data
  import rasa.shared.utils.io
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.training_data.story_reader.story_reader import StoryReader
  from rasa.shared.core.training_data.story_reader.yaml_story_reader import YAMLStoryReader
  from rasa.shared.core.training_data.structures import StoryStep
  from rasa.shared.data import YAML_FILE_EXTENSIONS
label_desc: Use image node_id 1 for calling a global function with example usage: _get_reader(filename, domain) and returns: YAMLStoryReader, _guess_reader