code: def test_persist_and_load(
      training_data: TrainingData,
      config: Dict[Text, Any],
      default_model_storage: ModelStorage,
      default_execution_context: ExecutionContext,
  ):
      classifier = KeywordIntentClassifier.create(
          config,
          default_model_storage,
          Resource("keyword"),
          default_execution_context,
      )
      classifier.train(training_data)
  
      loaded_classifier = KeywordIntentClassifier.load(
          config,
          default_model_storage,
          Resource("keyword"),
          default_execution_context,
      )
  
      predicted = copy.copy(training_data)
      actual = copy.copy(training_data)
      loaded_messages = loaded_classifier.process(
          predicted.training_examples
      )
      trained_messages = classifier.process(actual.training_examples)
      for m1, m2 in zip(loaded_messages, trained_messages):
          assert m1.get("intent") == m2.get("intent")
  
file_path: rasa/tests/nlu/classifiers/test_keyword_classifier.py
imports: from typing import Text, Dict, Any, Optional, Union
  import pytest
  import copy
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.nlu.classifiers.keyword_intent_classifier import KeywordIntentClassifier
  from rasa.shared.nlu.constants import TEXT, INTENT, PREDICTED_CONFIDENCE_KEY, INTENT_NAME_KEY
  from rasa.shared.nlu.training_data.formats.rasa import RasaReader
  import rasa.shared.nlu.training_data.loading
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.training_data.training_data import TrainingData
label_desc: Use image node_id 3 for calling a global function with example usage: test_persist_and_load(training_data, config, default_model_storage, default_execution_context) without return types