code: def test_spacy_preprocessor_process_training_data(
      spacy_nlp_component: SpacyNLP, spacy_model: SpacyModel
  ):
      training_data = TrainingDataImporter.load_from_dict(
          training_data_paths=[
              "data/test_e2ebot/data/nlu.yml",
              "data/test_e2ebot/data/stories.yml",
          ]
      ).get_nlu_data()
  
      spacy_nlp_component.process_training_data(
          training_data, spacy_model
      )
  
      for message in training_data.training_examples:
          for attr in DENSE_FEATURIZABLE_ATTRIBUTES:
              attr_text = message.data.get(attr)
              if attr_text:
                  doc = message.data[SPACY_DOCS[attr]]
                  assert isinstance(doc, spacy.tokens.doc.Doc)
                  assert doc.text == attr_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 5 for calling a global function with example usage: test_spacy_preprocessor_process_training_data(spacy_nlp_component, spacy_model) without return types