class_docstr: Data object used for all RasaModels.
  
  It contains all features needed to train the models.
  'data' is a mapping of attribute name, e.g. TEXT, INTENT, etc., and feature name,
  e.g. SENTENCE, SEQUENCE, etc., to a list of feature arrays representing the actual
  features.
  'label_key' and 'label_sub_key' point to the labels inside 'data'. For
  example, if your intent labels are stored under INTENT -> IDS, 'label_key' would
  be "INTENT" and 'label_sub_key' would be "IDS".
class_docstr_tok: ["Data","object","used","for","all","RasaModels",".","It","contains","all","features","needed","to","train","the","models",".","'data","'","is","a","mapping","of","attribute","name",",","e.g",".","TEXT",",","INTENT",",","etc.",",","and","feature","name",",","e.g",".","SENTENCE",",","SEQUENCE",",","etc.",",","to","a","list","of","feature","arrays","representing","the","actual","features",".","'label_key","'","and","'label_sub_key","'","point","to","the","labels","inside","'data","'",".","For","example",",","if","your","intent","labels","are","stored","under","INTENT","-",">","IDS",",","'label_key","'","would","be","``","INTENT","''","and","'label_sub_key","'","would","be","``","IDS","''","."]
docstr: Check whether the test data set is too large or too small.
  
  Args:
      number_of_test_examples: number of test examples
      label_counts: number of labels
  
  Raises:
      A ValueError if the number of examples does not fit.
docstr_tok: ["Check","whether","the","test","data","set","is","too","large","or","too","small",".","Args",":","number_of_test_examples",":","number","of","test","examples","label_counts",":","number","of","labels","Raises",":","A","ValueError","if","the","number","of","examples","does","not","fit","."]
code: def _check_train_test_sizes(
      self, number_of_test_examples: int, label_counts: Dict[Any, int]
  ) -> None:
      """Check whether the test data set is too large or too small.
  
      Args:
          number_of_test_examples: number of test examples
          label_counts: number of labels
  
      Raises:
          A ValueError if the number of examples does not fit.
      """
      if number_of_test_examples >= self.num_examples - len(
          label_counts
      ):
          raise ValueError(
              f"Test set of {number_of_test_examples} is too large. Remaining "
              f"train set should be at least equal to number of classes "
              f"{len(label_counts)}."
          )
      if number_of_test_examples < len(label_counts):
          raise ValueError(
              f"Test set of {number_of_test_examples} is too small. It should "
              f"be at least equal to number of classes {label_counts}."
          )
  
imports: import logging
  from typing import Optional, DefaultDict, Dict, Iterable, Text, List, Tuple, Any, Union, NamedTuple, ItemsView, overload, cast
  from collections import defaultdict, OrderedDict
  import numpy
  import scipy.sparse
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 25 for calling the RasaModelData obj's underlying member method code with example usage: obj._check_train_test_sizes(number_of_test_examples, label_counts) without return types