code: def test_whitespace_training():
      examples = [
          Message(
              data={
                  TEXT: "Any Mexican restaurant will do",
                  "intent": "restaurant_search",
                  "entities": [
                      {
                          "start": 4,
                          "end": 11,
                          "value": "Mexican",
                          "entity": "cuisine",
                      }
                  ],
              }
          ),
          Message(
              data={
                  TEXT: "I want Tacos!",
                  "intent": "restaurant_search",
                  "entities": [
                      {
                          "start": 7,
                          "end": 12,
                          "value": "Mexican",
                          "entity": "cuisine",
                      }
                  ],
              }
          ),
          Message(
              data={
                  TEXT: "action_restart",
                  "action_name": "action_restart",
              }
          ),
          Message(
              data={
                  TEXT: "Where are you going?",
                  ACTION_NAME: "Where are you going?",
                  ACTION_TEXT: "Where are you going?",
              }
          ),
      ]
  
      component_config = {
          "case_sensitive": False,
          "intent_tokenization_flag": True,
      }
      tk = create_whitespace_tokenizer(component_config)
  
      tk.process_training_data(TrainingData(training_examples=examples))
  
      assert examples[0].data.get(TOKENS_NAMES[TEXT])[0].text == "Any"
      assert (
          examples[0].data.get(TOKENS_NAMES[TEXT])[1].text == "Mexican"
      )
      assert (
          examples[0].data.get(TOKENS_NAMES[TEXT])[2].text
          == "restaurant"
      )
      assert examples[0].data.get(TOKENS_NAMES[TEXT])[3].text == "will"
      assert examples[0].data.get(TOKENS_NAMES[TEXT])[4].text == "do"
      assert examples[1].data.get(TOKENS_NAMES[TEXT])[0].text == "I"
      assert examples[1].data.get(TOKENS_NAMES[TEXT])[1].text == "want"
      assert examples[1].data.get(TOKENS_NAMES[TEXT])[2].text == "Tacos"
      assert (
          examples[2].data.get(TOKENS_NAMES[ACTION_NAME])[0].text
          == "action"
      )
      assert (
          examples[2].data.get(TOKENS_NAMES[ACTION_NAME])[1].text
          == "restart"
      )
      assert (
          examples[2].data.get(TOKENS_NAMES[TEXT])[0].text
          == "action_restart"
      )
      assert examples[2].data.get(TOKENS_NAMES[ACTION_TEXT]) is None
      assert (
          examples[3].data.get(TOKENS_NAMES[ACTION_TEXT])[0].text
          == "Where"
      )
      assert (
          examples[3].data.get(TOKENS_NAMES[ACTION_TEXT])[1].text
          == "are"
      )
      assert (
          examples[3].data.get(TOKENS_NAMES[ACTION_TEXT])[2].text
          == "you"
      )
      assert (
          examples[3].data.get(TOKENS_NAMES[ACTION_TEXT])[3].text
          == "going"
      )
  
file_path: rasa/tests/nlu/tokenizers/test_whitespace_tokenizer.py
imports: import pytest
  from typing import Dict, Optional
  import rasa.shared.utils.io
  from rasa.nlu.constants import TOKENS_NAMES
  from rasa.shared.nlu.constants import TEXT, INTENT, ACTION_TEXT, ACTION_NAME
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
label_desc: Use image node_id 4 for calling a global function with example usage: test_whitespace_training() without return types