code: def test_train_tokenizer_e2e_actions(
      text: Text,
      expected_tokens: List[Text],
      expected_indices: List[Tuple[int, int]],
  ):
      tk = create_whitespace_tokenizer()
  
      message = Message.build(text=text)
      message.set(ACTION_TEXT, text)
      message.set(ACTION_NAME, text)
  
      training_data = TrainingData()
      training_data.training_examples = [message]
  
      tk.process_training_data(training_data)
  
      for attribute in [ACTION_TEXT, TEXT]:
          tokens = training_data.training_examples[0].get(
              TOKENS_NAMES[attribute]
          )
  
          assert [t.text for t in tokens] == expected_tokens
          assert [t.start for t in tokens] == [
              i[0] for i in expected_indices
          ]
          assert [t.end for t in tokens] == [
              i[1] for i in expected_indices
          ]
  
imports: from typing import Any, Dict, Optional, Tuple, Text, List
  import pytest
  from rasa.nlu.tokenizers.tokenizer import Token
  from rasa.nlu.constants import TOKENS_NAMES
  from rasa.shared.nlu.constants import TEXT, INTENT, RESPONSE, INTENT_RESPONSE_KEY, 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_train_tokenizer_e2e_actions(text, expected_tokens, expected_indices) without return types