class_docstr: Base class to transform the dialogue state into an ML format.
  
  Subclasses of SingleStateFeaturizer will decide how a bot will
  transform the dialogue state into a dictionary mapping an attribute
  to its features. Possible attributes are: `INTENT`, `TEXT`, `ACTION_NAME`,
  `ACTION_TEXT`, `ENTITIES`, `SLOTS` and `ACTIVE_LOOP`. Each attribute will be
  featurized into a list of `rasa.utils.features.Features`.
class_docstr_tok: ["Base","class","to","transform","the","dialogue","state","into","an","ML","format",".","Subclasses","of","SingleStateFeaturizer","will","decide","how","a","bot","will","transform","the","dialogue","state","into","a","dictionary","mapping","an","attribute","to","its","features",".","Possible","attributes","are",":","`","INTENT","`",",","`","TEXT","`",",","`","ACTION_NAME","`",",","`","ACTION_TEXT","`",",","`","ENTITIES","`",",","`","SLOTS","`","and","`","ACTIVE_LOOP","`",".","Each","attribute","will","be","featurized","into","a","list","of","`","rasa.utils.features.Features","`","."]
docstr: Gets necessary information for featurization from domain.
  
  Args:
      domain: An instance of :class:`rasa.shared.core.domain.Domain`.
      bilou_tagging: indicates whether BILOU tagging should be used or not
docstr_tok: ["Gets","necessary","information","for","featurization","from","domain",".","Args",":","domain",":","An","instance","of",":","class",":","`","rasa.shared.core.domain.Domain","`",".","bilou_tagging",":","indicates","whether","BILOU","tagging","should","be","used","or","not"]
code: def prepare_for_training(
      self, domain: Domain, bilou_tagging: bool = False
  ) -> None:
      """Gets necessary information for featurization from domain.
  
      Args:
          domain: An instance of :class:`rasa.shared.core.domain.Domain`.
          bilou_tagging: indicates whether BILOU tagging should be used or not
      """
  
      # store feature states for each attribute in order to create binary features
      def convert_to_dict(
          feature_states: List[Text],
      ) -> Dict[Text, int]:
          return {
              feature_state: idx
              for idx, feature_state in enumerate(feature_states)
          }
  
      self._default_feature_states[INTENT] = convert_to_dict(
          domain.intents
      )
      self._default_feature_states[ACTION_NAME] = convert_to_dict(
          domain.action_names_or_texts
      )
      self._default_feature_states[ENTITIES] = convert_to_dict(
          domain.entity_states
      )
      self._default_feature_states[SLOTS] = convert_to_dict(
          domain.slot_states
      )
      self._default_feature_states[ACTIVE_LOOP] = convert_to_dict(
          domain.form_names
      )
      self.action_texts = domain.action_texts
      self.entity_tag_specs = self._create_entity_tag_specs(
          bilou_tagging
      )
  
imports: import logging
  import numpy
  import scipy.sparse
  from typing import List, Optional, Dict, Text, Set, Any
  from rasa.core.featurizers.precomputation import MessageContainerForCoreFeaturization
  from rasa.nlu.extractors.extractor import EntityTagSpec
  from rasa.nlu.utils import bilou_utils
  from rasa.nlu.utils.bilou_utils import BILOU_PREFIXES
  from rasa.shared.core.domain import SubState, State, Domain
  from rasa.shared.core.constants import PREVIOUS_ACTION, ACTIVE_LOOP, USER, SLOTS
  from rasa.shared.core.trackers import is_prev_action_listen_in_state
  from rasa.shared.nlu.constants import ENTITIES, FEATURE_TYPE_SENTENCE, ACTION_TEXT, ACTION_NAME, INTENT, NO_ENTITY_TAG, ENTITY_ATTRIBUTE_TYPE, ENTITY_TAGS, TEXT
  from rasa.shared.nlu.training_data.features import Features
  from rasa.utils.tensorflow import model_data_utils
label_desc: Use image node_id 3 for calling the SingleStateFeaturizer obj's underlying member method code with example usage: obj.prepare_for_training(domain, bilou_tagging) and returns: unknown