class_docstr: Base class for actual tracker featurizers.
class_docstr_tok: ["Base","class","for","actual","tracker","featurizers","."]
docstr: Featurizes the training trackers.
  
  Args:
      trackers: list of training trackers
      domain: the domain
      precomputations: Contains precomputed features and attributes.
      bilou_tagging: indicates whether BILOU tagging should be used or not
      ignore_action_unlikely_intent: Whether to remove `action_unlikely_intent`
          from training state features.
  
  Returns:
      - a dictionary of state types (INTENT, TEXT, ACTION_NAME, ACTION_TEXT,
        ENTITIES, SLOTS, ACTIVE_LOOP) to a list of features for all dialogue
        turns in all training trackers
      - the label ids (e.g. action ids) for every dialogue turn in all training
        trackers
      - A dictionary of entity type (ENTITY_TAGS) to a list of features
        containing entity tag ids for text user inputs otherwise empty dict
        for all dialogue turns in all training trackers
docstr_tok: ["Featurizes","the","training","trackers",".","Args",":","trackers",":","list","of","training","trackers","domain",":","the","domain","precomputations",":","Contains","precomputed","features","and","attributes",".","bilou_tagging",":","indicates","whether","BILOU","tagging","should","be","used","or","not","ignore_action_unlikely_intent",":","Whether","to","remove","`","action_unlikely_intent","`","from","training","state","features",".","Returns",":","-","a","dictionary","of","state","types","(","INTENT",",","TEXT",",","ACTION_NAME",",","ACTION_TEXT",",","ENTITIES",",","SLOTS",",","ACTIVE_LOOP",")","to","a","list","of","features","for","all","dialogue","turns","in","all","training","trackers","-","the","label","ids","(","e.g",".","action","ids",")","for","every","dialogue","turn","in","all","training","trackers","-","A","dictionary","of","entity","type","(","ENTITY_TAGS",")","to","a","list","of","features","containing","entity","tag","ids","for","text","user","inputs","otherwise","empty","dict","for","all","dialogue","turns","in","all","training","trackers"]
code: def featurize_trackers(
      self,
      trackers: List[DialogueStateTracker],
      domain: Domain,
      precomputations: Optional[MessageContainerForCoreFeaturization],
      bilou_tagging: bool = False,
      ignore_action_unlikely_intent: bool = False,
  ) -> Tuple[
      List[List[Dict[Text, List[Features]]]],
      np.ndarray,
      List[List[Dict[Text, List[Features]]]],
  ]:
      """Featurizes the training trackers.
  
      Args:
          trackers: list of training trackers
          domain: the domain
          precomputations: Contains precomputed features and attributes.
          bilou_tagging: indicates whether BILOU tagging should be used or not
          ignore_action_unlikely_intent: Whether to remove `action_unlikely_intent`
              from training state features.
  
      Returns:
          - a dictionary of state types (INTENT, TEXT, ACTION_NAME, ACTION_TEXT,
            ENTITIES, SLOTS, ACTIVE_LOOP) to a list of features for all dialogue
            turns in all training trackers
          - the label ids (e.g. action ids) for every dialogue turn in all training
            trackers
          - A dictionary of entity type (ENTITY_TAGS) to a list of features
            containing entity tag ids for text user inputs otherwise empty dict
            for all dialogue turns in all training trackers
      """
      self.prepare_for_featurization(domain, bilou_tagging)
      (
          trackers_as_states,
          trackers_as_labels,
          trackers_as_entities,
      ) = self.training_states_labels_and_entities(
          trackers,
          domain,
          ignore_action_unlikely_intent=ignore_action_unlikely_intent,
      )
  
      tracker_state_features = self._featurize_states(
          trackers_as_states, precomputations
      )
  
      if not tracker_state_features and not trackers_as_labels:
          # If input and output were empty, it means there is
          # no data on which the policy can be trained
          # hence return them as it is. They'll be handled
          # appropriately inside the policy.
          return (
              tracker_state_features,
              np.ndarray(trackers_as_labels),
              [],
          )
  
      label_ids = self._convert_labels_to_ids(
          trackers_as_labels, domain
      )
  
      entity_tags = self._create_entity_tags(
          trackers_as_entities, precomputations, bilou_tagging
      )
  
      return tracker_state_features, label_ids, entity_tags
  
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 11 for calling the TrackerFeaturizer obj's underlying member method code with example usage: obj.featurize_trackers(trackers, domain, precomputations, bilou_tagging, ignore_action_unlikely_intent) and returns: tracker_state_features,  label_ids,  entity_tags, tracker_state_features,  np,  list