code: def test_train_test_split(filepaths: List[Text]):
      from rasa.shared.importers.utils import training_data_from_paths
  
      training_data = training_data_from_paths(filepaths, language="en")
  
      assert training_data.intents == {
          "affirm",
          "greet",
          "restaurant_search",
          "goodbye",
          "chitchat",
      }
      assert training_data.entities == {"location", "cuisine"}
      assert set(training_data.responses.keys()) == {
          "utter_chitchat/ask_name",
          "utter_chitchat/ask_weather",
      }
  
      NUM_TRAIN_EXAMPLES = 46
      NUM_RESPONSE_EXAMPLES = 4
  
      assert len(training_data.training_examples) == NUM_TRAIN_EXAMPLES
      assert len(training_data.intent_examples) == NUM_TRAIN_EXAMPLES
      assert (
          len(training_data.response_examples) == NUM_RESPONSE_EXAMPLES
      )
  
      for train_percent in range(50, 95, 5):
          train_frac = train_percent / 100.0
          train_split, test_split = training_data.train_test_split(
              train_frac
          )
  
          assert (
              len(test_split.training_examples)
              + len(train_split.training_examples)
              == NUM_TRAIN_EXAMPLES
          )
  
          num_classes = (
              len(training_data.number_of_examples_per_intent.keys())
              + -len(training_data.retrieval_intents)
              + len(training_data.number_of_examples_per_response)
          )
  
          expected_num_train_examples_floor = int(
              train_frac * NUM_TRAIN_EXAMPLES
          )
          if (
              NUM_TRAIN_EXAMPLES - expected_num_train_examples_floor
              < num_classes
          ):
              expected_num_train_examples_floor = (
                  NUM_TRAIN_EXAMPLES - num_classes - 1
              )
  
          assert (
              len(train_split.training_examples)
              >= expected_num_train_examples_floor
          )
          assert (
              len(train_split.training_examples)
              <= expected_num_train_examples_floor + 1
          )
  
          assert len(
              training_data.number_of_examples_per_intent.keys()
          ) == len(test_split.number_of_examples_per_intent.keys())
          assert len(
              training_data.number_of_examples_per_intent.keys()
          ) == len(train_split.number_of_examples_per_intent.keys())
          assert len(
              training_data.number_of_examples_per_response.keys()
          ) == len(train_split.number_of_examples_per_response.keys())
          assert len(
              training_data.number_of_examples_per_response.keys()
          ) == len(train_split.number_of_examples_per_response.keys())
  
imports: from pathlib import Path
  from typing import Text, List, Dict, Any
  from unittest.mock import Mock
  from _pytest.monkeypatch import MonkeyPatch
  import pytest
  import numpy
  import rasa.shared.utils.io
  from rasa.shared.core.constants import USER_INTENT_OUT_OF_SCOPE
  from rasa.shared.nlu.constants import TEXT, INTENT_RESPONSE_KEY, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_TYPE, ENTITIES, INTENT, ACTION_NAME, FEATURE_TYPE_SENTENCE
  from rasa.nlu.convert import convert_training_data
  from rasa.nlu.extractors.mitie_entity_extractor import MitieEntityExtractor
  from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.loading import guess_format, UNK, load_data
  from rasa.shared.nlu.training_data.util import get_file_format_extension, template_key_to_intent_response_key, intent_response_key_to_template_key
  import rasa.shared.data
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.events import UserUttered, ActionExecuted
  from rasa.shared.core.training_data.structures import StoryGraph, StoryStep
  from rasa.shared.importers.importer import TrainingDataImporter, E2EImporter
label_desc: Use image node_id 11 for calling a global function with example usage: test_train_test_split(filepaths) without return types