code: def test_converter_for_training(
      input_converter: CoreFeaturizationInputConverter,
  ):
      # create domain and story graph
      domain = Domain(
          intents=["greet", "inform", "domain-only-intent"],
          entities=["entity_name"],
          slots=[],
          responses=dict(),
          action_names=["action_listen", "utter_greet"],
          forms=dict(),
          data={},
          action_texts=["Hi how are you?"],
      )
      events = [
          ActionExecuted(action_name="action_listen"),
          UserUttered(
              text="hey this has some entities",
              intent={INTENT_NAME_KEY: "greet"},
              entities=[
                  _create_entity(value="Bot", type="entity_name")
              ],
          ),
          ActionExecuted(
              action_name="utter_greet", action_text="Hi how are you?"
          ),
          ActionExecuted(action_name="action_listen"),
          UserUttered(
              text="some test with an intent!",
              intent={INTENT_NAME_KEY: "inform"},
          ),
          ActionExecuted(action_name="action_listen"),
      ]
      story_graph = StoryGraph([StoryStep("name", events=events)])
      # convert!
      training_data = input_converter.convert_for_training(
          domain=domain, story_graph=story_graph
      )
      messages = training_data.training_examples
      # check that messages were created from (story) events as expected
      _check_messages_created_from_events_as_expected(
          events=events, messages=messages
      )
      # check that messages were created from domain as expected
      for intent in domain.intent_properties:
          assert Message(data={INTENT: intent}) in messages
      for action_name_or_text in domain.action_names_or_texts:
          if action_name_or_text in domain.action_texts:
              assert (
                  Message(data={ACTION_TEXT: action_name_or_text})
                  in messages
              )
          else:
              assert (
                  Message(data={ACTION_NAME: action_name_or_text})
                  in messages
              )
      # check that each message contains only one attribute, which must be a key attribute
      _check_messages_contain_attribute_which_is_key_attribute(
          messages=messages
      )
  
imports: import pytest
  import numpy
  import itertools
  from typing import List, Text, Optional, Dict
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.core.featurizers.precomputation import CoreFeaturizationCollector, MessageContainerForCoreFeaturization, CoreFeaturizationInputConverter
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.constants import INTENT, TEXT, ENTITIES, ACTION_NAME, ACTION_TEXT, INTENT_NAME_KEY, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_ROLE, ENTITY_ATTRIBUTE_GROUP
  from rasa.shared.core.slots import TextSlot
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.events import Event, UserUttered, ActionExecuted
  from rasa.shared.core.training_data.structures import StoryGraph, StoryStep
  from rasa.shared.core.trackers import DialogueStateTracker
label_desc: Use image node_id 21 for calling a global function with example usage: test_converter_for_training(input_converter) without return types