code: def test_migrate_domain_format_from_dir(tmp_path: Path):
      domain_dir = tmp_path / "domain"
      domain_dir.mkdir()
  
      prepare_domain_path(
          domain_dir,
          """
          version: "2.0"
          entities:
              - outdoor
          slots:
            outdoor_seating:
             type: bool
             influence_conversation: false
          """,
          "slots.yml",
      )
  
      prepare_domain_path(
          domain_dir,
          """
          version: "2.0"
          forms:
            reservation_form:
              required_slots:
                 outdoor_seating:
                 - type: from_intent
                   value: true
                   intent: confirm
          """,
          "forms.yml",
      )
  
      domain_out_dir = tmp_path / "new_domain"
      domain_out_dir.mkdir()
  
      migrate.migrate_domain_format(domain_dir, domain_out_dir)
      domain = Domain.from_directory(str(domain_out_dir))
  
      assert domain
  
      old_domain_path = tmp_path / "original_domain"
      assert old_domain_path.exists()
  
      for file in old_domain_path.iterdir():
          assert file.name in ["slots.yml", "forms.yml"]
  
      for file in domain_out_dir.iterdir():
          assert file.name in ["slots.yml", "forms.yml"]
          migrated_file = rasa.shared.utils.io.read_yaml_file(file)
  
          migrated_training_data_version = migrated_file.get("version")
          assert (
              migrated_training_data_version
              == LATEST_TRAINING_DATA_FORMAT_VERSION
          )
  
imports: import itertools
  import shutil
  import re
  import textwrap
  from pathlib import Path
  from typing import Text, Any, Tuple, Callable
  from unittest.mock import patch, call
  import pytest
  import rasa.shared.utils.io
  from rasa.core import migrate
  from rasa.shared.core.domain import Domain
  from rasa.shared.exceptions import RasaException
  from rasa.shared.constants import LATEST_TRAINING_DATA_FORMAT_VERSION
label_desc: Use image node_id 6 for calling a global function with example usage: test_migrate_domain_format_from_dir(tmp_path) without return types