code: def test_persist_and_load(
      training_data: TrainingData,
      default_sklearn_intent_classifier: SklearnIntentClassifier,
      default_model_storage: ModelStorage,
      default_execution_context: ExecutionContext,
      train_and_preprocess: Callable[
          ..., Tuple[TrainingData, List[GraphComponent]]
      ],
      spacy_nlp_component: SpacyNLP,
      spacy_model: SpacyModel,
  ):
      training_data = spacy_nlp_component.process_training_data(
          training_data, spacy_model
      )
  
      training_data, loaded_pipeline = train_and_preprocess(
          pipeline=[
              {"component": SpacyTokenizer},
              {"component": SpacyFeaturizer},
          ],
          training_data=training_data,
      )
      default_sklearn_intent_classifier.train(training_data)
  
      loaded = SklearnIntentClassifier.load(
          SklearnIntentClassifier.get_default_config(),
          default_model_storage,
          Resource("sklearn"),
          default_execution_context,
      )
  
      predicted = copy.deepcopy(training_data)
      actual = copy.deepcopy(training_data)
      loaded_messages = loaded.process(predicted.training_examples)
      trained_messages = default_sklearn_intent_classifier.process(
          actual.training_examples
      )
  
      for m1, m2 in zip(loaded_messages, trained_messages):
          assert m1.get("intent") == m2.get("intent")
  
imports: import copy
  import logging
  from typing import Callable, List, Text, Tuple
  import pytest
  from _pytest.logging import LogCaptureFixture
  from rasa.nlu.featurizers.dense_featurizer.spacy_featurizer import SpacyFeaturizer
  from rasa.nlu.tokenizers.spacy_tokenizer import SpacyTokenizer
  from rasa.nlu.utils.spacy_utils import SpacyModel, SpacyNLP
  import rasa.shared.nlu.training_data.loading
  from rasa.engine.graph import ExecutionContext, GraphComponent
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.nlu.classifiers.sklearn_intent_classifier import SklearnIntentClassifier
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.constants import TEXT, INTENT
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 3 for calling a global function with example usage: test_persist_and_load(training_data, default_sklearn_intent_classifier, default_model_storage, default_execution_context, train_and_preprocess, spacy_nlp_component, spacy_model) without return types