code: def test_process_multiple_messages(
      create_lexical_syntactic_featurizer: Callable[
          [Dict[Text, Any]], LexicalSyntacticFeaturizer
      ]
  ):
      # build a message with tokens for lots of attributes
      multiple_messages = []
      for sentence in ["hello", "hello there"]:
          tokens = [
              Token(text=match[0], start=match.start())
              for match in re.finditer(r"\w+", sentence)
          ]
  
          multiple_messages.append(
              Message(data={TOKENS_NAMES[TEXT]: tokens})
          )
  
      # train and process
      featurizer = create_lexical_syntactic_featurizer(
          {"alias": "lsf", "features": [["prefix2"]]}
      )
      featurizer.train(TrainingData(multiple_messages))
      featurizer.process(multiple_messages)
      for message in multiple_messages:
          assert len(message.features) == 1
          assert message.features[0].attribute == TEXT
  
      # we know both texts where used for training if more than one feature has been
      # extracted e.g. for the first message from which only the prefix "he" can be
      # extracted
      assert multiple_messages[0].features[0].features.shape[-1] > 1
  
imports: import numpy
  import pytest
  import re
  from typing import Text, Dict, Any, Callable, List, Optional, Union
  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 DENSE_FEATURIZABLE_ATTRIBUTES, MESSAGE_ATTRIBUTES, TOKENS_NAMES
  from rasa.nlu.tokenizers.spacy_tokenizer import POS_TAG_KEY
  from rasa.nlu.featurizers.sparse_featurizer.lexical_syntactic_featurizer import LexicalSyntacticFeaturizer, FEATURES
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.constants import FEATURE_TYPE_SEQUENCE, TEXT
  from rasa.shared.exceptions import InvalidConfigException
  from rasa.nlu.tokenizers.tokenizer import Token
label_desc: Use image node_id 6 for calling a global function with example usage: test_process_multiple_messages(create_lexical_syntactic_featurizer) without return types