code: def test_splitter_pass_cv_object(load_pos_and_neg_data):
      """Tests the passing of a `sktime` cv splitter to fold_strategy"""
  
      from sktime.forecasting.model_selection._split import (
          ExpandingWindowSplitter,
      )
  
      from pycaret.time_series import setup
  
      fold = 3
      fh = np.arange(1, 13)  # regular horizon of 12 months
      fh_extended = np.arange(1, 25)  # extended horizon of 24 months
      fold_strategy = ExpandingWindowSplitter(
          initial_window=72,
          step_length=12,
          # window_length=12,
          fh=fh,
      )
  
      exp_name = setup(
          data=load_pos_and_neg_data,
          fold=fold,  # should be ignored since we are passing explicit fold_strategy
          fh=fh_extended,  # should be ignored since we are passing explicit fold_strategy
          fold_strategy=fold_strategy,
      )
  
      assert (
          exp_name.fold_generator.initial_window
          == fold_strategy.initial_window
      )
      assert np.all(exp_name.fold_generator.fh == fold_strategy.fh)
      assert (
          exp_name.fold_generator.step_length
          == fold_strategy.step_length
      )
      num_folds = exp_name.get_config("fold_param")
      y_train = exp_name.get_config("y_train")
  
      expected = fold_strategy.get_n_splits(y=y_train)
      assert num_folds == expected
  
imports: import math
  import numpy
  import pandas
  import pytest
  from time_series_test_utils import _get_seasonal_values, _get_seasonal_values_alphanumeric, _return_data_seasonal_types_strictly_pos, _return_setup_args_raises, _return_splitter_args
  from pycaret.datasets import get_data
  from pycaret.time_series import TSForecastingExperiment
label_desc: Use image node_id 2 for calling a global function with example usage: test_splitter_pass_cv_object(load_pos_and_neg_data) without return types