code: def test_migrate_domain_form_without_required_slots(
      tmp_path: Path, domain_out_file: Path
  ):
      existing_domain_file = prepare_domain_path(
          tmp_path,
          """
          version: "2.0"
          intents:
          - greet
          - affirm
          - inform
          entities:
          - city
          - name
          - surname
          slots:
            location:
              type: text
              influence_conversation: false
            name:
              type: text
              influence_conversation: false
              auto_fill: false
            email:
              type: text
              influence_conversation: false
          forms:
             booking_form:
                 ignored_intents:
                 - greet
                 location:
                   - type: from_entity
                     entity: city
                 email:
                   - type: from_text
                     intent: inform
                 name:
                   - type: from_entity
                     entity: surname
          """,
          "domain.yml",
      )
      migrate.migrate_domain_format(
          existing_domain_file, domain_out_file
      )
  
      domain = Domain.from_path(domain_out_file)
      assert domain
  
      old_domain_path = tmp_path / "original_domain.yml"
      assert old_domain_path
  
      migrated_domain = rasa.shared.utils.io.read_yaml_file(
          domain_out_file
      )
  
      migrated_slots = migrated_domain.get("slots")
      expected_slots = {
          "location": {
              "type": "text",
              "influence_conversation": False,
              "mappings": [
                  {
                      "type": "from_entity",
                      "entity": "city",
                      "conditions": [{"active_loop": "booking_form"}],
                  }
              ],
          },
          "name": {
              "type": "text",
              "influence_conversation": False,
              "mappings": [
                  {
                      "type": "from_entity",
                      "entity": "surname",
                      "conditions": [{"active_loop": "booking_form"}],
                  }
              ],
          },
          "email": {
              "type": "text",
              "influence_conversation": False,
              "mappings": [
                  {
                      "type": "from_text",
                      "intent": "inform",
                      "conditions": [
                          {
                              "active_loop": "booking_form",
                              "requested_slot": "email",
                          }
                      ],
                  }
              ],
          },
      }
      assert migrated_slots == expected_slots
  
      migrated_forms = migrated_domain.get("forms")
      expected_forms = {
          "booking_form": {
              "ignored_intents": ["greet"],
              "required_slots": ["location", "email", "name"],
          }
      }
      assert migrated_forms == expected_forms
  
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 4 for calling a global function with example usage: test_migrate_domain_form_without_required_slots(tmp_path, domain_out_file) without return types