code: def featurizer_sparse(tmpdir):
      """Generate a featurizer for tests."""
      node_storage = LocalModelStorage(pathlib.Path(tmpdir))
      node_resource = Resource("sparse_feat")
      context = ExecutionContext(node_storage, node_resource)
      return CountVectorsFeaturizer(
          config=CountVectorsFeaturizer.get_default_config(),
          resource=node_resource,
          model_storage=node_storage,
          execution_context=context,
      )
  
file_path: rasa/tests/nlu/classifiers/test_logistic_regression_classifier.py
imports: import copy
  import pytest
  import pathlib
  from rasa.shared.nlu.training_data.message import Message
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.local_model_storage import LocalModelStorage
  from rasa.engine.graph import ExecutionContext
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
  from rasa.nlu.featurizers.sparse_featurizer.count_vectors_featurizer import CountVectorsFeaturizer
  from rasa.nlu.classifiers.logistic_regression_classifier import LogisticRegressionClassifier
label_desc: Use image node_id 1 for calling a global function with example usage: featurizer_sparse(tmpdir) and returns: CountVectorsFeaturizer