code: def test_fit_predict_cv(method):
      """Test cv argument in fit_predict, fit_predict_proba."""
      X, y = make_classification_problem()
  
      clf = KNeighborsTimeSeriesClassifier()
      clf.random_state = 42
      cv = KFold(3, random_state=42, shuffle=True)
  
      y_pred_cv_int = getattr(clf, method)(
          X, y, cv=3, change_state=False
      )
      y_pred_cv_obj = getattr(clf, method)(
          X, y, cv=cv, change_state=False
      )
      assert not clf.is_fitted
  
      _assert_array_almost_equal(y_pred_cv_int, y_pred_cv_obj)
      assert -1 not in y_pred_cv_int
  
      assert len(y) == len(y_pred_cv_int)
      if method == "fit_predict_proba":
          n_cl = len(y.unique())
          assert y_pred_cv_int.shape[1] == n_cl
  
      # check that state is same as self.fit(X, y) if change_state=True
      y_pred_cv_obj_fit = getattr(clf, method)(
          X, y, cv=cv, change_state=True
      )
      assert clf.is_fitted
  
      # get output from fit and predict or predict_proba
      clf = KNeighborsTimeSeriesClassifier()
      normal_method = method.partition("_")[2]
      y_pred_normal = getattr(clf.fit(X, y), normal_method)(X)
  
      _assert_array_almost_equal(y_pred_normal, y_pred_cv_obj_fit)
  
imports: import pickle
  import numpy
  import pandas
  import pytest
  from sklearn.model_selection import KFold
  from sktime.classification.base import BaseClassifier
  from sktime.classification.deep_learning.base import BaseDeepClassifier
  from sktime.classification.distance_based import KNeighborsTimeSeriesClassifier
  from sktime.classification.dummy import DummyClassifier
  from sktime.utils._testing.estimator_checks import _assert_array_almost_equal
  from sktime.utils._testing.panel import _make_classification_y, _make_panel, make_classification_problem
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 10 for calling a global function with example usage: test_fit_predict_cv(method) without return types