class_docstr: Defines functionality for the available slot mappings.
class_docstr_tok: ["Defines","functionality","for","the","available","slot","mappings","."]
docstr: Checks whether user intent matches slot mapping intent specifications.
docstr_tok: ["Checks","whether","user","intent","matches","slot","mapping","intent","specifications","."]
code: def intent_is_desired(
      mapping: Dict[Text, Any],
      tracker: "DialogueStateTracker",
      domain: "Domain",
  ) -> bool:
      """Checks whether user intent matches slot mapping intent specifications."""
      mapping_intents = SlotMapping.to_list(mapping.get(INTENT, []))
      mapping_not_intents = SlotMapping.to_list(
          mapping.get(NOT_INTENT, [])
      )
  
      active_loop_name = tracker.active_loop_name
      if active_loop_name:
          mapping_not_intents = (
              mapping_not_intents
              + SlotMapping._get_active_loop_ignored_intents(
                  mapping, domain, active_loop_name
              )
          )
  
      if tracker.latest_message:
          intent = tracker.latest_message.intent.get(INTENT_NAME_KEY)
      else:
          intent = None
  
      intent_not_blocked = not mapping_intents and intent not in set(
          mapping_not_intents
      )
  
      return intent_not_blocked or intent in mapping_intents
  
file_path: rasa/rasa/shared/core/slot_mappings.py
imports: from typing import Text, Dict, Any, List, Optional, TYPE_CHECKING
  from rasa.shared.constants import DOCS_URL_SLOTS, IGNORED_INTENTS
  import rasa.shared.utils.io
  from rasa.shared.nlu.constants import ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_ROLE, ENTITY_ATTRIBUTE_GROUP, INTENT, NOT_INTENT, INTENT_NAME_KEY
  from rasa.shared.core.constants import SLOT_MAPPINGS, MAPPING_TYPE, SlotMappingType, MAPPING_CONDITIONS
label_desc: Use image node_id 3 for calling the SlotMapping obj's underlying member method code with example usage: obj.intent_is_desired(mapping, tracker, domain) and returns: unknown