class_docstr: Truncates the tracker history into `max_history` long sequences.
  
  Creates training data from trackers where intents are the output prediction
  labels. Tracker state sequences which represent policy input are truncated
  to not excede `max_history` states.
class_docstr_tok: ["Truncates","the","tracker","history","into","`","max_history","`","long","sequences",".","Creates","training","data","from","trackers","where","intents","are","the","output","prediction","labels",".","Tracker","state","sequences","which","represent","policy","input","are","truncated","to","not","excede","`","max_history","`","states","."]
docstr: Converts a list of labels to a matrix of label ids.
  
  The number of rows is equal to `len(trackers_as_intents)`. The number of
  columns is equal to the maximum number of positive labels that any training
  example is associated with. Rows are padded with `LABEL_PAD_ID` if not all rows
  have the same number of labels.
  
  Args:
      trackers_as_intents: Positive example label ids
          associated with each training example.
      domain: The domain of the training data.
  
  Returns:
     A matrix of label ids.
docstr_tok: ["Converts","a","list","of","labels","to","a","matrix","of","label","ids",".","The","number","of","rows","is","equal","to","`","len","(","trackers_as_intents",")","`",".","The","number","of","columns","is","equal","to","the","maximum","number","of","positive","labels","that","any","training","example","is","associated","with",".","Rows","are","padded","with","`","LABEL_PAD_ID","`","if","not","all","rows","have","the","same","number","of","labels",".","Args",":","trackers_as_intents",":","Positive","example","label","ids","associated","with","each","training","example",".","domain",":","The","domain","of","the","training","data",".","Returns",":","A","matrix","of","label","ids","."]
code: def _convert_labels_to_ids(
      cls, trackers_as_intents: List[List[Text]], domain: Domain
  ) -> np.ndarray:
      """Converts a list of labels to a matrix of label ids.
  
      The number of rows is equal to `len(trackers_as_intents)`. The number of
      columns is equal to the maximum number of positive labels that any training
      example is associated with. Rows are padded with `LABEL_PAD_ID` if not all rows
      have the same number of labels.
  
      Args:
          trackers_as_intents: Positive example label ids
              associated with each training example.
          domain: The domain of the training data.
  
      Returns:
         A matrix of label ids.
      """
      # store labels in numpy arrays so that it corresponds to np arrays
      # of input features
      label_ids = [
          [domain.intents.index(intent) for intent in tracker_intents]
          for tracker_intents in trackers_as_intents
      ]
  
      return np.array(cls._pad_label_ids(label_ids))
  
imports: from __future__ import annotations
  from pathlib import Path
  from collections import defaultdict
  from abc import abstractmethod
  import jsonpickle
  import logging
  from tqdm import tqdm
  from typing import Tuple, List, Optional, Dict, Text, Union, Any, Iterator, Set, DefaultDict, cast
  import numpy
  from rasa.core.featurizers.single_state_featurizer import SingleStateFeaturizer
  from rasa.core.featurizers.precomputation import MessageContainerForCoreFeaturization
  from rasa.core.exceptions import InvalidTrackerFeaturizerUsageError
  import rasa.shared.core.trackers
  import rasa.shared.utils.io
  from rasa.shared.nlu.constants import TEXT, INTENT, ENTITIES, ACTION_NAME
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.core.trackers import DialogueStateTracker
  from rasa.shared.core.domain import State, Domain
  from rasa.shared.core.events import Event, ActionExecuted, UserUttered
  from rasa.shared.core.constants import USER, ACTION_UNLIKELY_INTENT_NAME, PREVIOUS_ACTION
  from rasa.shared.exceptions import RasaException
  from rasa.utils.tensorflow.constants import LABEL_PAD_ID
  from rasa.utils.tensorflow.model_data import ragged_array_to_ndarray
label_desc: Use image node_id 1 for calling the IntentMaxHistoryTrackerFeaturizer obj's underlying member method code with example usage: obj._convert_labels_to_ids(cls, trackers_as_intents, domain) and returns: np