code: def test_migrate_domain_format_duplicated_slots_in_forms(
      tmp_path: Path, domain_out_file: Path
  ):
      existing_domain_file = prepare_domain_path(
          tmp_path,
          """
          version: "2.0"
          intents:
          - greet
          - affirm
          - inform
          entities:
          - city
          slots:
            name:
              type: text
              influence_conversation: false
            location:
               type: text
               influence_conversation: false
          forms:
             form_one:
                 required_slots:
                   name:
                   - type: from_text
                     intent: inform
                   location:
                   - type: from_text
                     intent: greet
             form_two:
                 required_slots:
                   name:
                   - type: from_text
                     intent: inform
                   - type: from_intent
                     intent: deny
                     value: demo
                   location:
                   - type: from_entity
                     entity: city
          """,
          "domain.yml",
      )
      migrate.migrate_domain_format(
          existing_domain_file, domain_out_file
      )
  
      domain = Domain.from_path(domain_out_file)
      assert domain
  
      migrated_domain = rasa.shared.utils.io.read_yaml_file(
          domain_out_file
      )
      migrated_slots = migrated_domain.get("slots")
      slot_with_duplicate_mappings = migrated_slots.get("name")
      assert slot_with_duplicate_mappings == {
          "type": "text",
          "influence_conversation": False,
          "mappings": [
              {
                  "type": "from_text",
                  "intent": "inform",
                  "conditions": [
                      {
                          "active_loop": "form_one",
                          "requested_slot": "name",
                      },
                      {
                          "active_loop": "form_two",
                          "requested_slot": "name",
                      },
                  ],
              },
              {
                  "type": "from_intent",
                  "intent": "deny",
                  "value": "demo",
                  "conditions": [
                      {
                          "active_loop": "form_two",
                          "requested_slot": "name",
                      }
                  ],
              },
          ],
      }
      slot_with_different_mapping_conditions = migrated_slots.get(
          "location"
      )
      assert slot_with_different_mapping_conditions == {
          "type": "text",
          "influence_conversation": False,
          "mappings": [
              {
                  "type": "from_text",
                  "intent": "greet",
                  "conditions": [
                      {
                          "active_loop": "form_one",
                          "requested_slot": "location",
                      }
                  ],
              },
              {
                  "type": "from_entity",
                  "entity": "city",
                  "conditions": [{"active_loop": "form_two"}],
              },
          ],
      }
  
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 10 for calling a global function with example usage: test_migrate_domain_format_duplicated_slots_in_forms(tmp_path, domain_out_file) without return types