code: def _get_updated_mapping_condition(
      condition: Dict[Text, Text],
      mapping: Dict[Text, Any],
      slot_name: Text,
  ) -> Dict[Text, Text]:
      if mapping.get(MAPPING_TYPE) not in [
          str(SlotMappingType.FROM_ENTITY),
          str(SlotMappingType.FROM_TRIGGER_INTENT),
      ]:
          return {**condition, REQUESTED_SLOT: slot_name}
      return condition
  
imports: import copy
  import shutil
  from pathlib import Path
  from typing import List, Dict, Text, Any, Tuple, Optional, Union
  from ruamel.yaml.scalarstring import DoubleQuotedScalarString
  import rasa.shared.utils.io
  import rasa.shared.utils.cli
  from rasa.shared.constants import REQUIRED_SLOTS_KEY, IGNORED_INTENTS
  from rasa.shared.core.constants import ACTIVE_LOOP, REQUESTED_SLOT, SlotMappingType, MAPPING_TYPE, SLOT_MAPPINGS
  from rasa.shared.constants import LATEST_TRAINING_DATA_FORMAT_VERSION
  from rasa.shared.core.domain import KEY_ENTITIES, KEY_SLOTS, KEY_FORMS, Domain
  from rasa.shared.exceptions import RasaException
  from rasa.shared.utils.validation import KEY_TRAINING_DATA_FORMAT_VERSION
label_desc: Use image node_id 2 for calling a global function with example usage: _get_updated_mapping_condition(condition, mapping, slot_name) and returns: condition, dict