code: def test_slot_mapping_entity_is_desired(
      slot_name: Text, expected: bool
  ):
      domain = Domain.from_file("data/test_domains/travel_form.yml")
      tracker = DialogueStateTracker("test_id", slots=domain.slots)
      event = UserUttered(
          text="I'm travelling to Vancouver.",
          intent={"name": "inform", "confidence": 0.9604260921478271},
          entities=[
              {
                  "entity": "GPE",
                  "value": "Vancouver",
                  "role": "destination",
              }
          ],
      )
      tracker.update(event, domain)
      slot_mappings = (
          domain.as_dict().get("slots").get(slot_name).get("mappings")
      )
      assert (
          SlotMapping.entity_is_desired(slot_mappings[0], tracker)
          is expected
      )
  
file_path: rasa/tests/shared/core/test_slot_mappings.py
imports: from typing import Text
  import pytest
  from rasa.shared.constants import LATEST_TRAINING_DATA_FORMAT_VERSION
  from rasa.shared.core.constants import SlotMappingType
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.events import UserUttered, ActiveLoop
  from rasa.shared.core.slot_mappings import SlotMapping
  from rasa.shared.core.trackers import DialogueStateTracker
  from rasa.shared.utils.validation import YamlValidationException
label_desc: Use image node_id 1 for calling a global function with example usage: test_slot_mapping_entity_is_desired(slot_name, expected) without return types