code: def test_gridsearch():
      lr = LinearRegression()
      svr_lin = SVR(kernel="linear", gamma="auto")
      ridge = Ridge(random_state=1)
      svr_rbf = SVR(kernel="rbf", gamma="auto")
      stregr = StackingRegressor(
          regressors=[svr_lin, lr, ridge], meta_regressor=svr_rbf
      )
  
      params = {
          "ridge__alpha": [0.01, 1.0],
          "svr__C": [0.01, 1.0],
          "meta_regressor__C": [0.01, 1.0],
      }
  
      if Version(sklearn_version) < Version("0.24.1"):
          grid = GridSearchCV(
              estimator=stregr,
              param_grid=params,
              cv=5,
              iid=False,
              refit=True,
              verbose=0,
          )
      else:
          grid = GridSearchCV(
              estimator=stregr,
              param_grid=params,
              cv=5,
              refit=True,
              verbose=0,
          )
      grid = grid.fit(X1, y)
      best = 0.1
      got = round(grid.best_score_, 2)
      assert best == got
  
imports: import numpy
  import pytest
  from numpy.testing import assert_almost_equal
  from packaging.version import Version
  from scipy import sparse
  from sklearn import __version__
  from sklearn.base import clone
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.linear_model import LinearRegression, Ridge
  from sklearn.model_selection import GridSearchCV, train_test_split
  from sklearn.neighbors import KNeighborsRegressor
  from sklearn.svm import SVR
  from mlxtend.externals.estimator_checks import NotFittedError
  from mlxtend.regressor import StackingRegressor
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 9 for calling a global function with example usage: test_gridsearch() without return types