code: def test_regex_featurizer_no_sequence(
      sentence: Text,
      expected_sequence_features: List[float],
      expected_sentence_features: List[float],
      spacy_nlp: Any,
      create_featurizer: Callable[..., RegexFeaturizer],
      spacy_tokenizer: SpacyTokenizer,
  ):
      patterns = [
          {"pattern": "[0-9]+", "name": "number", "usage": "intent"},
          {"pattern": "\\bhey*", "name": "hello", "usage": "intent"},
          {"pattern": "[0-1]+", "name": "binary", "usage": "intent"},
      ]
      ftr = create_featurizer(known_patterns=patterns)
  
      # adds tokens to the message
      message = Message(data={TEXT: sentence})
      message.set(SPACY_DOCS[TEXT], spacy_nlp(sentence))
      spacy_tokenizer.process([message])
  
      sequence_features, sentence_features = ftr._features_for_patterns(
          message, TEXT
      )
      assert np.allclose(
          sequence_features.toarray()[0],
          expected_sequence_features,
          atol=1e-10,
      )
      assert np.allclose(
          sentence_features.toarray()[-1],
          expected_sentence_features,
          atol=1e-10,
      )
  
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 6 for calling a global function with example usage: test_regex_featurizer_no_sequence(sentence, expected_sequence_features, expected_sentence_features, spacy_nlp, create_featurizer, spacy_tokenizer) without return types