code: def _migrate_auto_fill(
      slot_name: Text, properties: Dict[Text, Any], entities: List[Text]
  ) -> Dict[Text, Any]:
      if (
          slot_name in entities
          and properties.get("auto_fill", True) is True
      ):
          from_entity_mapping = {
              "type": str(SlotMappingType.FROM_ENTITY),
              "entity": slot_name,
          }
          mappings = properties.get(SLOT_MAPPINGS, [])
          if from_entity_mapping not in mappings:
              mappings.append(from_entity_mapping)
              properties.update({SLOT_MAPPINGS: mappings})
  
      if "auto_fill" in properties:
          del properties["auto_fill"]
  
      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 5 for calling a global function with example usage: _migrate_auto_fill(slot_name, properties, entities) and returns: properties