code: def test_lookup_tables_without_use_word_boundaries(
      sentence: Text,
      tokens: List[Tuple[Text, float]],
      expected_sequence_features: List[float],
      expected_sentence_features: List[float],
      labeled_tokens: List[float],
      create_featurizer: Callable[..., RegexFeaturizer],
  ):
      from rasa.nlu.tokenizers.tokenizer import Token
  
      lookups = [
          {"name": "cites", "elements": ["北京", "上海", "广州", "深圳", "杭州"]},
          {"name": "dates", "elements": ["昨天", "今天", "明天", "后天"]},
      ]
      ftr = create_featurizer({"use_word_boundaries": False})
      training_data = TrainingData()
      training_data.lookup_tables = lookups
      ftr.train(training_data)
  
      # adds tokens to the message
      message = Message(data={TEXT: sentence})
      message.set(
          TOKENS_NAMES[TEXT],
          [Token(word, start) for (word, start) in tokens],
      )
  
      sequence_features, sentence_features = ftr._features_for_patterns(
          message, TEXT
      )
      assert np.allclose(
          sequence_features.toarray(),
          expected_sequence_features,
          atol=1e-10,
      )
      assert np.allclose(
          sentence_features.toarray(),
          expected_sentence_features,
          atol=1e-10,
      )
  
      # the number of regex matches on each token should match
      for i, token in enumerate(message.get(TOKENS_NAMES[TEXT])):
          token_matches = token.get("pattern").values()
          num_matches = sum(token_matches)
          assert num_matches == labeled_tokens.count(i)
  
imports: from typing import Text, List, Any, Tuple, Callable, Dict, Optional
  import dataclasses
  import numpy
  import pytest
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.nlu.featurizers.sparse_featurizer.regex_featurizer import RegexFeaturizer
  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
  from rasa.nlu.constants import SPACY_DOCS, TOKENS_NAMES
  from rasa.shared.nlu.constants import TEXT, INTENT, RESPONSE
  from rasa.nlu.tokenizers.spacy_tokenizer import SpacyTokenizer
label_desc: Use image node_id 4 for calling a global function with example usage: test_lookup_tables_without_use_word_boundaries(sentence, tokens, expected_sequence_features, expected_sentence_features, labeled_tokens, create_featurizer) without return types