code: def test_regressor_gridsearch():
      lr = LinearRegression()
      svr_rbf = SVR(kernel="rbf", gamma="auto")
      ridge = Ridge(random_state=1)
      stregr = StackingCVRegressor(
          regressors=[lr], meta_regressor=svr_rbf, random_state=1
      )
  
      params = {"regressors": [[ridge, lr], [lr, ridge, lr]]}
  
      if Version(sklearn_version) < Version("0.24.1"):
          grid = GridSearchCV(
              estimator=stregr,
              param_grid=params,
              iid=False,
              cv=5,
              refit=True,
          )
      else:
          grid = GridSearchCV(
              estimator=stregr, param_grid=params, cv=5, refit=True
          )
      grid.fit(X1, y)
  
      assert len(grid.best_params_["regressors"]) == 3
  
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 8 for calling a global function with example usage: test_regressor_gridsearch() without return types