code: def test_gridsearch_replace_mix():
      svr_lin = SVR(kernel="linear", gamma="auto")
      ridge = Ridge(random_state=1)
      svr_rbf = SVR(kernel="rbf", gamma="auto")
      lr = LinearRegression()
      lasso = Lasso(random_state=1)
      stack = StackingCVRegressor(
          regressors=[svr_lin, lasso, ridge],
          meta_regressor=svr_rbf,
          shuffle=False,
      )
  
      params = {
          "regressors": [[svr_lin, lr]],
          "linearregression": [None, lasso, ridge],
          "svr__kernel": ["poly"],
      }
  
      if Version(sklearn_version) < Version("0.24.1"):
          grid = GridSearchCV(
              estimator=stack,
              param_grid=params,
              cv=KFold(5, shuffle=True, random_state=42),
              iid=False,
              refit=True,
              verbose=0,
          )
      else:
          grid = GridSearchCV(
              estimator=stack,
              param_grid=params,
              cv=KFold(5, shuffle=True, random_state=42),
              refit=True,
              verbose=0,
          )
      grid = grid.fit(X1, y)
  
      got1 = round(grid.best_score_, 2)
      got2 = len(grid.best_params_["regressors"])
      got3 = grid.best_params_["regressors"][0].kernel
  
      assert got1 == 0.73, got1
      assert got2 == 2, got2
      assert got3 == "poly", got3
  
imports: import random
  import numpy
  import pytest
  from packaging.version import Version
  from scipy import sparse
  from sklearn import __version__
  from sklearn.base import clone
  from sklearn.linear_model import Lasso, LinearRegression, Ridge
  from sklearn.model_selection import GridSearchCV, KFold, train_test_split
  from sklearn.neighbors import KNeighborsRegressor
  from sklearn.svm import SVR
  from mlxtend.externals.estimator_checks import NotFittedError
  from mlxtend.regressor import StackingCVRegressor
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 20 for calling a global function with example usage: test_gridsearch_replace_mix() without return types