code: def test_knn_cv3():
      iris = load_iris()
      X = iris.data
      y = iris.target
      knn = KNeighborsClassifier(n_neighbors=4)
      sfs1 = SFS(
          knn,
          k_features=3,
          forward=True,
          floating=False,
          cv=4,
          verbose=0,
      )
      sfs1 = sfs1.fit(X, y)
      sfs1.subsets_
      expect = {
          1: {
              "avg_score": 0.9599928876244666,
              "cv_scores": np.array([0.974, 0.947, 0.919, 1.0]),
              "feature_idx": (3,),
          },
          2: {
              "avg_score": 0.95993589743589736,
              "cv_scores": np.array([0.974, 0.947, 0.919, 1.0]),
              "feature_idx": (2, 3),
          },
          3: {
              "avg_score": 0.9732,
              "cv_scores": np.array([0.974, 1.0, 0.946, 0.973]),
              "feature_idx": (1, 2, 3),
          },
      }
  
      if Version(sklearn_version) < Version("1.0"):
          expect[1]["avg_score"] = 0.95299145299145294
          expect[1]["cv_scores"] = (
              np.array([0.974, 0.947, 0.892, 1.0]),
          )
  
      if Version(sklearn_version) < Version("0.22"):
          expect[1]["cv_scores"] = np.array(
              [0.97435897, 0.94871795, 0.88888889, 1.0]
          )
          expect[2]["cv_scores"] = np.array(
              [0.97435897, 0.94871795, 0.91666667, 1.0]
          )
          expect[2]["avg_score"] = 0.97275641025641035
          expect[3]["cv_scores"] = np.array(
              [0.97435897, 1.0, 0.94444444, 0.97222222]
          )
  
      dict_compare_utility(
          d_actual=sfs1.subsets_, d_desired=expect, decimal=2
      )
  
imports: import numpy
  import pandas
  from numpy import nan
  from numpy.testing import assert_almost_equal
  from packaging.version import Version
  from sklearn import __version__
  from sklearn.datasets import load_iris
  from sklearn.decomposition import PCA
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.linear_model import LinearRegression
  from sklearn.metrics import accuracy_score, make_scorer, roc_auc_score
  from sklearn.model_selection import GridSearchCV, GroupKFold
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.pipeline import Pipeline
  from mlxtend.classifier import SoftmaxRegression
  from mlxtend.data import boston_housing_data
  from mlxtend.feature_selection import SequentialFeatureSelector
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 11 for calling a global function with example usage: test_knn_cv3() without return types