code: def test_prepare_for_training():
      domain = Domain(
          intents=["greet"],
          entities=["name"],
          slots=[TextSlot("name", mappings=[{}])],
          responses={},
          forms={},
          action_names=["utter_greet", "action_check_weather"],
          data={},
      )
  
      f = SingleStateFeaturizer()
      f.prepare_for_training(domain)
  
      assert len(f._default_feature_states[INTENT]) > 1
      assert "greet" in f._default_feature_states[INTENT]
      assert len(f._default_feature_states[ENTITIES]) == 1
      assert f._default_feature_states[ENTITIES]["name"] == 0
      assert len(f._default_feature_states[SLOTS]) == 1
      assert f._default_feature_states[SLOTS]["name_0"] == 0
      assert len(f._default_feature_states[ACTION_NAME]) > 2
      assert "utter_greet" in f._default_feature_states[ACTION_NAME]
      assert (
          "action_check_weather"
          in f._default_feature_states[ACTION_NAME]
      )
      assert len(f._default_feature_states[ACTIVE_LOOP]) == 0
  
imports: from typing import Text
  import numpy
  import re
  import scipy.sparse
  import pytest
  from rasa.nlu.tokenizers.tokenizer import Token
  from rasa.nlu.constants import TOKENS_NAMES
  from rasa.core.featurizers.precomputation import MessageContainerForCoreFeaturization
  from rasa.core.featurizers.single_state_featurizer import SingleStateFeaturizer
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.constants import ACTION_TEXT, ACTION_NAME, ENTITIES, TEXT, INTENT, FEATURE_TYPE_SEQUENCE, FEATURE_TYPE_SENTENCE, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, ENTITY_TAGS
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.slots import TextSlot
  from rasa.shared.core.constants import ACTION_LISTEN_NAME, ACTIVE_LOOP, PREVIOUS_ACTION, SLOTS, ENTITY_LABEL_SEPARATOR, USER
  from rasa.utils.tensorflow.constants import SENTENCE, SEQUENCE
label_desc: Use image node_id 4 for calling a global function with example usage: test_prepare_for_training() without return types