class_docstr: A class used to verify usage of intents and utterances.
class_docstr_tok: ["A","class","used","to","verify","usage","of","intents","and","utterances","."]
docstr: Verifies that actions used in stories and rules are present in the domain.
docstr_tok: ["Verifies","that","actions","used","in","stories","and","rules","are","present","in","the","domain","."]
code: def verify_actions_in_stories_rules(self) -> bool:
      """Verifies that actions used in stories and rules are present in the domain."""
      everything_is_alright = True
      visited = set()
  
      for story in self.story_graph.story_steps:
          for event in story.events:
              if not isinstance(event, ActionExecuted):
                  continue
  
              if not event.action_name:
                  continue
  
              if not event.action_name.startswith("action_"):
                  continue
  
              if event.action_name in visited:
                  # we already processed this one before, we only want to warn once
                  continue
  
              if (
                  event.action_name
                  not in self.domain.action_names_or_texts
              ):
                  rasa.shared.utils.io.raise_warning(
                      f"The action '{event.action_name}' is used in the "
                      f"'{story.block_name}' block, but it "
                      f"is not listed in the domain file. You should add it to your "
                      f"domain file!",
                      docs=DOCS_URL_DOMAINS,
                  )
                  everything_is_alright = False
              visited.add(event.action_name)
  
      return everything_is_alright
  
imports: import logging
  from collections import defaultdict
  from typing import Set, Text, Optional, Dict, Any, List
  import rasa.core.training.story_conflict
  import rasa.shared.nlu.constants
  from rasa.shared.constants import ASSISTANT_ID_DEFAULT_VALUE, ASSISTANT_ID_KEY, CONFIG_MANDATORY_KEYS, DOCS_URL_DOMAINS, DOCS_URL_FORMS, UTTER_PREFIX, DOCS_URL_ACTIONS, REQUIRED_SLOTS_KEY
  from rasa.shared.core import constants
  from rasa.shared.core.constants import MAPPING_CONDITIONS, ACTIVE_LOOP
  from rasa.shared.core.events import ActionExecuted, ActiveLoop
  from rasa.shared.core.events import UserUttered
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.generator import TrainingDataGenerator
  from rasa.shared.core.constants import SlotMappingType, MAPPING_TYPE
  from rasa.shared.core.training_data.structures import StoryGraph
  from rasa.shared.importers.importer import TrainingDataImporter
  from rasa.shared.nlu.training_data.training_data import TrainingData
  import rasa.shared.utils.io
label_desc: Use image node_id 10 for calling the Validator obj's underlying member method code with example usage: obj.verify_actions_in_stories_rules() and returns: everything_is_alright