code: def test_blend_model_predict(load_setup, load_models):
      """Test to make sure that blending predictions are different when they need
      to be and same when they need to be (depending on the hyperparameters).
      """
      exp = load_setup
      models = load_models
      random.seed(42)
      weights = [random.uniform(0, 1) for _ in range(len(models))]
  
      # -------------------------------------------------------------------------#
      # Prediction should be different for different methods
      # -------------------------------------------------------------------------#
      mean_blender = exp.blend_models(models, method="mean")
      gmean_blender = exp.blend_models(models, method="gmean")
      median_blender = exp.blend_models(models, method="median")
      min_blender = exp.blend_models(models, method="min")
      max_blender = exp.blend_models(models, method="max")
  
      mean_blender_w_wts = exp.blend_models(
          models, method="mean", weights=weights
      )
      gmean_blender_w_wts = exp.blend_models(
          models, method="gmean", weights=weights
      )
      median_blender_w_wts = exp.blend_models(
          models, method="median", weights=weights
      )
      min_blender_w_wts = exp.blend_models(
          models, method="min", weights=weights
      )
      max_blender_w_wts = exp.blend_models(
          models, method="max", weights=weights
      )
  
      mean_blender_pred = exp.predict_model(mean_blender)
      gmean_blender_pred = exp.predict_model(gmean_blender)
      median_blender_pred = exp.predict_model(median_blender)
      min_blender_pred = exp.predict_model(min_blender)
      max_blender_pred = exp.predict_model(max_blender)
  
      mean_blender_w_wts_pred = exp.predict_model(mean_blender_w_wts)
      gmean_blender_w_wts_pred = exp.predict_model(gmean_blender_w_wts)
      median_blender_w_wts_pred = exp.predict_model(
          median_blender_w_wts
      )
      min_blender_w_wts_pred = exp.predict_model(min_blender_w_wts)
      max_blender_w_wts_pred = exp.predict_model(max_blender_w_wts)
  
      different_preds = [
          mean_blender_pred,
          gmean_blender_pred,
          median_blender_pred,
          min_blender_pred,
          max_blender_pred,
          mean_blender_w_wts_pred,
          gmean_blender_w_wts_pred,
          median_blender_w_wts_pred,
      ]
  
      for i, _ in enumerate(different_preds):
          for j in range(i + 1, len(different_preds)):
              assert not np.array_equal(
                  different_preds[i], different_preds[j]
              )
  
      # -------------------------------------------------------------------------#
      # Prediction for some methods should not be impacted by weights
      # e.g. min, max
      # -------------------------------------------------------------------------#
      assert np.array_equal(
          min_blender_pred, min_blender_w_wts_pred
      ), "min blender predictions with and without weights are not the same"
      assert np.array_equal(
          max_blender_pred, max_blender_w_wts_pred
      ), "max blender predictions with and without weights are not the same"
  
file_path: pycaret/tests/test_time_series_blending.py
imports: import random
  import numpy
  import pandas
  import pytest
  from pycaret.datasets import get_data
  from pycaret.time_series import TSForecastingExperiment
label_desc: Use image node_id 3 for calling a global function with example usage: test_blend_model_predict(load_setup, load_models) without return types