code: def test_load_multi_file_training_data(domain: Domain):
      featurizer = MaxHistoryTrackerFeaturizer(
          SingleStateFeaturizer(), max_history=2
      )
      trackers = training.load_data(
          "data/test_yaml_stories/stories.yml",
          domain,
          augmentation_factor=0,
      )
      trackers = sorted(trackers, key=lambda t: t.sender_id)
  
      (tr_as_sts, tr_as_acts) = featurizer.training_states_and_labels(
          trackers, domain
      )
      hashed = []
      for sts, acts in zip(tr_as_sts, tr_as_acts):
          hashed.append(json.dumps(sts + acts, sort_keys=True))
      hashed = sorted(hashed, reverse=True)
  
      data, label_ids, _ = featurizer.featurize_trackers(
          trackers, domain, precomputations=None
      )
  
      featurizer_mul = MaxHistoryTrackerFeaturizer(
          SingleStateFeaturizer(), max_history=2
      )
      trackers_mul = training.load_data(
          "data/test_multifile_yaml_stories",
          domain,
          augmentation_factor=0,
      )
      trackers_mul = sorted(trackers_mul, key=lambda t: t.sender_id)
  
      (
          tr_as_sts_mul,
          tr_as_acts_mul,
      ) = featurizer.training_states_and_labels(trackers_mul, domain)
      hashed_mul = []
      for sts_mul, acts_mul in zip(tr_as_sts_mul, tr_as_acts_mul):
          hashed_mul.append(
              json.dumps(sts_mul + acts_mul, sort_keys=True)
          )
      hashed_mul = sorted(hashed_mul, reverse=True)
  
      data_mul, label_ids_mul, _ = featurizer_mul.featurize_trackers(
          trackers_mul, domain, precomputations=None
      )
  
      assert hashed == hashed_mul
      # we check for intents, action names and entities -- the features which
      # are included in the story files
  
      data = _surface_attributes(data)
      data_mul = _surface_attributes(data_mul)
  
      for attribute in [INTENT, ACTION_NAME, ENTITIES]:
          if attribute not in data or attribute not in data_mul:
              continue
          assert len(data.get(attribute)) == len(
              data_mul.get(attribute)
          )
  
          for idx_tracker in range(len(data.get(attribute))):
              for idx_dialogue in range(
                  len(data.get(attribute)[idx_tracker])
              ):
                  f1 = data.get(attribute)[idx_tracker][idx_dialogue]
                  f2 = data_mul.get(attribute)[idx_tracker][
                      idx_dialogue
                  ]
                  if f1 is None or f2 is None:
                      assert f1 == f2
                      continue
                  for idx_turn in range(len(f1)):
                      f1 = data.get(attribute)[idx_tracker][
                          idx_dialogue
                      ][idx_turn]
                      f2 = data_mul.get(attribute)[idx_tracker][
                          idx_dialogue
                      ][idx_turn]
                      assert np.all((f1 == f2).data)
  
      assert np.all(label_ids == label_ids_mul)
  
imports: import json
  import warnings
  import numpy
  import os
  import pytest
  import sys
  from collections import Counter
  from pathlib import Path
  from typing import Any, Text, List, Dict, Optional
  from _pytest.monkeypatch import MonkeyPatch
  from unittest.mock import Mock
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.nlu.training_data.message import Message
  import rasa.shared.utils.io
  from rasa.shared.exceptions import FileNotFoundException, YamlSyntaxException, YamlException
  from rasa.core.actions.action import ACTION_LISTEN_NAME
  from rasa.core import training
  from rasa.core.featurizers.tracker_featurizers import MaxHistoryTrackerFeaturizer
  from rasa.core.featurizers.single_state_featurizer import SingleStateFeaturizer
  from rasa.utils.tensorflow.model_data_utils import _surface_attributes
  from rasa.shared.constants import INTENT_MESSAGE_PREFIX, LATEST_TRAINING_DATA_FORMAT_VERSION
  from rasa.shared.core.constants import RULE_SNIPPET_ACTION_NAME
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.training_data import loading
  from rasa.shared.core.events import ActionExecuted, UserUttered, SlotSet, ActiveLoop
  from rasa.shared.core.training_data.story_reader.yaml_story_reader import YAMLStoryReader, DEFAULT_VALUE_TEXT_SLOTS
  from rasa.shared.core.training_data.structures import StoryStep, RuleStep
  from rasa.shared.nlu.constants import ACTION_NAME, ENTITIES, ENTITY_ATTRIBUTE_END, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_VALUE, FEATURE_TYPE_SENTENCE, INTENT, INTENT_NAME_KEY, INTENT_RANKING_KEY, PREDICTED_CONFIDENCE_KEY, TEXT, EXTRACTOR
  from tests.conftest import filter_expected_warnings
label_desc: Use image node_id 35 for calling a global function with example usage: test_load_multi_file_training_data(domain) without return types