code: def _migrate_custom_slots(
      slot_name: Text, properties: Dict[Text, Any]
  ) -> Dict[Text, Any]:
      if not properties.get("mappings"):
          properties.update({"mappings": [{"type": "custom"}]})
  
          rasa.shared.utils.io.raise_warning(
              f"A custom mapping was added to slot '{slot_name}'. "
              f"Please double-check this is correct.",
              UserWarning,
          )
  
      return properties
  
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 6 for calling a global function with example usage: _migrate_custom_slots(slot_name, properties) and returns: properties