code: def _migrate_auto_fill_and_custom_slots(
      domain: Dict[Text, Any], slots: Dict[Text, Any]
  ) -> Dict[Text, Any]:
      new_slots = {}
      entities = domain.get(KEY_ENTITIES, [])
  
      for slot_name, properties in slots.items():
          updated_properties = _migrate_auto_fill(
              slot_name, properties, entities
          )
          updated_properties = _migrate_custom_slots(
              slot_name, updated_properties
          )
  
          new_slots[slot_name] = updated_properties
      return new_slots
  
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 7 for calling a global function with example usage: _migrate_auto_fill_and_custom_slots(domain, slots) and returns: new_slots