code: def _guess_reader(filename: Text, domain: Domain) -> StoryReader:
      if YAMLStoryReader.is_stories_file(filename):
          return YAMLStoryReader(domain, filename)
  
      raise ValueError(
          f"Failed to find a reader class for the story file `{filename}`. "
          f"Supported formats are "
          f"{', '.join(YAML_FILE_EXTENSIONS)}."
      )
  
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 2 for calling a global function with example usage: _guess_reader(filename, domain) and returns: YAMLStoryReader