code: def test_time_series_persistence(
      tmpdir, load_pos_and_neg_data, preprocess_data
  ):
      data = load_pos_and_neg_data
      exp = TSForecastingExperiment()
      exp.setup(
          data,
          transform_target="sqrt",
          html=False,
          session_id=123,
          n_jobs=1,
      )
      exp_path = os.path.join(tmpdir, "exp.pkl")
      exp.save_experiment(exp_path)
  
      new_exp = TSForecastingExperiment.load_experiment(
          exp_path,
          data=data if preprocess_data else exp.data,
          preprocess_data=preprocess_data,
      )
      # check experiment equality is not working for TS due to sktime,
      # so we simply compare results
      model = exp.create_model("ets")
      results = exp.pull()
      preds = exp.predict_model(model)
  
      new_model = new_exp.create_model("ets")
      new_results = new_exp.pull()
      new_preds = new_exp.predict_model(new_model)
  
      assert preds.equals(new_preds)
      assert results.equals(new_results)
  
file_path: pycaret/tests/test_persistence_experiment.py
imports: import os
  import joblib
  import pytest
  import pycaret.anomaly
  import pycaret.classification
  import pycaret.clustering
  import pycaret.datasets
  import pycaret.regression
  import pycaret.time_series
  from pycaret.anomaly import AnomalyExperiment
  from pycaret.classification import ClassificationExperiment
  from pycaret.clustering import ClusteringExperiment
  from pycaret.regression import RegressionExperiment
  from pycaret.time_series import TSForecastingExperiment
label_desc: Use image node_id 6 for calling a global function with example usage: test_time_series_persistence(tmpdir, load_pos_and_neg_data, preprocess_data) without return types