code: def test_spacy_preprocessor_adds_attributes_when_processing(
      case_sensitive: bool, spacy_model: SpacyModel
  ):
      preprocessor = create_spacy_nlp_component(
          case_sensitive=case_sensitive
      )
      message_data = {
          TEXT: "Hello my name is Joe",
          RESPONSE: "Some response",
          ACTION_TEXT: "Action Text",
      }
      message = Message(data=message_data)
      preprocessor.process([message], spacy_model)
  
      for attr, text in message_data.items():
          doc = message.data[SPACY_DOCS[attr]]
  
          assert isinstance(doc, spacy.tokens.doc.Doc)
  
          if case_sensitive:
              assert doc.text == text
          else:
              assert doc.text == text.lower()
  
file_path: rasa/tests/nlu/test_spacy_utils.py
imports: from typing import Optional, Text
  import pytest
  import spacy.tokens.doc
  from rasa.nlu.constants import DENSE_FEATURIZABLE_ATTRIBUTES, SPACY_DOCS
  from rasa.nlu.model import InvalidModelError
  from rasa.nlu.utils.spacy_utils import SpacyNLP, SpacyModel
  from rasa.shared.importers.importer import TrainingDataImporter
  from rasa.shared.nlu.constants import ACTION_TEXT, RESPONSE, TEXT
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 4 for calling a global function with example usage: test_spacy_preprocessor_adds_attributes_when_processing(case_sensitive, spacy_model) without return types