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: Checks intents used in stories.
  
  Verifies if the intents used in the stories are valid, and whether
  all valid intents are used in the stories.
docstr_tok: ["Checks","intents","used","in","stories",".","Verifies","if","the","intents","used","in","the","stories","are","valid",",","and","whether","all","valid","intents","are","used","in","the","stories","."]
code: def verify_intents_in_stories(
      self, ignore_warnings: bool = True
  ) -> bool:
      """Checks intents used in stories.
  
      Verifies if the intents used in the stories are valid, and whether
      all valid intents are used in the stories.
      """
      everything_is_alright = self.verify_intents(
          ignore_warnings=ignore_warnings
      )
  
      stories_intents = {
          event.intent["name"]
          for story in self.story_graph.story_steps
          for event in story.events
          if type(event) == UserUttered
          and event.intent_name is not None
      }
  
      for story_intent in stories_intents:
          if story_intent not in self.domain.intents:
              rasa.shared.utils.io.raise_warning(
                  f"The intent '{story_intent}' is used in your stories, 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 = ignore_warnings
  
      for intent in self._non_default_intents():
          if intent not in stories_intents:
              rasa.shared.utils.io.raise_warning(
                  f"The intent '{intent}' is not used in any story or rule."
              )
              everything_is_alright = (
                  ignore_warnings or everything_is_alright
              )
  
      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 6 for calling the Validator obj's underlying member method code with example usage: obj.verify_intents_in_stories(ignore_warnings) and returns: everything_is_alright