code: def test_lm_featurizer_correctly_handle_whitespace_token(
      text: Text,
      tokens: List[Tuple[Text, int]],
      expected_feature_tokens: List[Tuple[Text, int]],
      create_language_model_featurizer: Callable[
          [Dict[Text, Any]], LanguageModelFeaturizer
      ],
  ):
      config = {
          "model_name": "bert",
          "model_weights": "bert-base-chinese",
      }
  
      lm_featurizer = create_language_model_featurizer(config)
  
      message = Message.build(text=text)
      message.set(
          TOKENS_NAMES[TEXT],
          [Token(word, start) for (word, start) in tokens],
      )
  
      result, _ = lm_featurizer._tokenize_example(message, TEXT)
  
      assert [
          (token.text, token.start) for token in result
      ] == expected_feature_tokens
  
imports: import os
  from typing import Text, List, Dict, Tuple, Any, Callable
  import numpy
  import pytest
  import logging
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.logging import LogCaptureFixture
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.storage.resource import Resource
  from rasa.nlu.constants import TOKENS_NAMES, NUMBER_OF_SUB_TOKENS
  from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.nlu.featurizers.dense_featurizer.lm_featurizer import LanguageModelFeaturizer
  from rasa.shared.nlu.constants import TEXT, INTENT
  from rasa.nlu.tokenizers.tokenizer import Token
label_desc: Use image node_id 12 for calling a global function with example usage: test_lm_featurizer_correctly_handle_whitespace_token(text, tokens, expected_feature_tokens, create_language_model_featurizer) without return types