code: def verify_predictor_save_load(
      predictor, df, verify_embedding=True, cls=MultiModalPredictor
  ):
      root = str(uuid.uuid4())
      os.makedirs(root, exist_ok=True)
      predictor.save(root)
      predictions = predictor.predict(df, as_pandas=False)
      # Test fit_summary()
      predictor.fit_summary()
  
      loaded_predictor = cls.load(root)
      # Test fit_summary()
      loaded_predictor.fit_summary()
  
      predictions2 = loaded_predictor.predict(df, as_pandas=False)
      predictions2_df = loaded_predictor.predict(df, as_pandas=True)
      npt.assert_equal(predictions, predictions2)
      npt.assert_equal(predictions2, predictions2_df.to_numpy())
      if predictor.problem_type in [BINARY, MULTICLASS]:
          predictions_prob = predictor.predict_proba(
              df, as_pandas=False
          )
          predictions2_prob = loaded_predictor.predict_proba(
              df, as_pandas=False
          )
          predictions2_prob_df = loaded_predictor.predict_proba(
              df, as_pandas=True
          )
          npt.assert_equal(predictions_prob, predictions2_prob)
          npt.assert_equal(
              predictions2_prob, predictions2_prob_df.to_numpy()
          )
      if verify_embedding:
          embeddings = predictor.extract_embedding(df)
          assert embeddings.shape[0] == len(df)
      shutil.rmtree(root)
  
imports: import copy
  import os
  import shutil
  import tempfile
  import uuid
  import numpy.testing
  import pytest
  from omegaconf import OmegaConf
  from torch import nn
  from autogluon.multimodal import MultiModalPredictor
  from autogluon.multimodal.constants import BEST, BINARY, BIT_FIT, DATA, DISTILLER, ENVIRONMENT, GREEDY_SOUP, IA3, LORA, LORA_BIAS, LORA_NORM, MODEL, MULTICLASS, NORM_FIT, OPTIMIZATION, UNIFORM_SOUP
  from autogluon.multimodal.utils import modify_duplicate_model_names
  from autogluon.multimodal.utils.misc import shopee_dataset
  from ..utils.unittest_datasets import AEDataset, HatefulMeMesDataset, PetFinderDataset
  from ..utils.utils import get_home_dir
label_desc: Use image node_id 1 for calling a global function with example usage: verify_predictor_save_load(predictor, df, verify_embedding, cls) without return types