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 if the label key exists.
  
  Raises:
      ValueError if the label key and sub-key is not in data.
docstr_tok: ["Check","if","the","label","key","exists",".","Raises",":","ValueError","if","the","label","key","and","sub-key","is","not","in","data","."]
code: def _check_label_key(self) -> None:
      """Check if the label key exists.
  
      Raises:
          ValueError if the label key and sub-key is not in data.
      """
      if (
          self.label_key is not None
          and self.label_sub_key is not None
          and (
              self.label_key not in self.data
              or self.label_sub_key not in self.data[self.label_key]
              or len(self.data[self.label_key][self.label_sub_key]) > 1
          )
      ):
          raise ValueError(
              f"Key '{self.label_key}.{self.label_sub_key}' not in RasaModelData."
          )
  
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 28 for calling the RasaModelData obj's underlying member method code with example usage: obj._check_label_key() without return types