code: def test_when_models_saved_then_they_can_be_loaded(
      model_class, trained_models, prediction_length
  ):
      model = trained_models[(prediction_length, repr(model_class))]
  
      model.save()
  
      loaded_model = model.__class__.load(path=model.path)
  
      assert dict_equal_primitive(model.params, loaded_model.params)
      assert dict_equal_primitive(
          model.params_aux, loaded_model.params_aux
      )
      assert model.metadata == loaded_model.metadata
      for orig_oof_pred, loaded_oof_pred in zip(
          model.get_oof_predictions(),
          loaded_model.get_oof_predictions(),
      ):
          assert orig_oof_pred.equals(loaded_oof_pred)
  
imports: import itertools
  import shutil
  import sys
  import tempfile
  from unittest import mock
  import numpy
  import pandas
  import pytest
  from flaky import flaky
  from autogluon.common import space
  from autogluon.core.hpo.constants import RAY_BACKEND
  from autogluon.timeseries import TimeSeriesDataFrame
  from autogluon.timeseries.dataset.ts_dataframe import ITEMID, TIMESTAMP
  from autogluon.timeseries.metrics import AVAILABLE_METRICS
  from autogluon.timeseries.models import DeepARModel, ETSModel
  from autogluon.timeseries.models.abstract import AbstractTimeSeriesModel
  from autogluon.timeseries.models.multi_window import MultiWindowBacktestingModel
  from ..common import DUMMY_TS_DATAFRAME, CustomMetric, dict_equal_primitive, get_data_frame_with_item_index
  from .test_gluonts import TESTABLE_MODELS
  from .test_local import TESTABLE_MODELS
  from .test_mlforecast import TESTABLE_MODELS
  from .test_multi_window_model import get_multi_window_deepar
label_desc: Use image node_id 7 for calling a global function with example usage: test_when_models_saved_then_they_can_be_loaded(model_class, trained_models, prediction_length) without return types