code: def extract_story_graph(
      resource_name: Text,
      domain: "Domain",
      exclusion_percentage: Optional[int] = None,
  ) -> "StoryGraph":
      """Loads training stories / rules from file or directory.
  
      Args:
          resource_name: Path to file or directory.
          domain: The model domain.
          exclusion_percentage: Percentage of stories which should be dropped. `None`
              if all training data should be used.
  
      Returns:
          The loaded training data as graph.
      """
      from rasa.shared.core.training_data.structures import StoryGraph
      import rasa.shared.core.training_data.loading as core_loading
  
      story_steps = core_loading.load_data_from_resource(
          resource_name,
          domain,
          exclusion_percentage=exclusion_percentage,
      )
      return StoryGraph(story_steps)
  
label_desc: Use image node_id 1 for calling a global function with example usage: extract_story_graph(resource_name, domain, exclusion_percentage) and returns: StoryGraph