code: def _assemble_new_domain(
      domain_file: Path,
      new_forms: Dict[Text, Any],
      new_slots: Dict[Text, Any],
  ) -> Dict[Text, Any]:
      original_content = rasa.shared.utils.io.read_yaml(
          rasa.shared.utils.io.read_file(domain_file)
      )
      new_domain: Dict[Text, Any] = {}
      for key, value in original_content.items():
          if key == KEY_SLOTS:
              new_domain.update({key: new_slots})
          elif key == KEY_FORMS:
              new_domain.update({key: new_forms})
          elif key == "version":
              new_domain.update(
                  {
                      key: DoubleQuotedScalarString(
                          LATEST_TRAINING_DATA_FORMAT_VERSION
                      )
                  }
              )
          else:
              new_domain.update({key: value})
      return new_domain
  
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 8 for calling a global function with example usage: _assemble_new_domain(domain_file, new_forms, new_slots) and returns: new_domain