code: def test_stacking_randomness(estimator, X, y):
      # checking that fixing the random state of the CV will lead to the same
      # results
      estimator_full = clone(estimator)
      estimator_full.set_params(
          cv=KFold(shuffle=True, random_state=np.random.RandomState(0))
      )
  
      estimator_drop = clone(estimator)
      estimator_drop.set_params(lr="drop")
      estimator_drop.set_params(
          cv=KFold(shuffle=True, random_state=np.random.RandomState(0))
      )
  
      assert_allclose(
          estimator_full.fit(X, y).transform(X)[:, 1:],
          estimator_drop.fit(X, y).transform(X),
      )
  
imports: from unittest.mock import Mock
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from scipy import sparse
  from sklearn.base import BaseEstimator, ClassifierMixin, RegressorMixin, clone
  from sklearn.datasets import load_breast_cancer, load_diabetes, load_iris, make_classification, make_multilabel_classification, make_regression
  from sklearn.dummy import DummyClassifier, DummyRegressor
  from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor, StackingClassifier, StackingRegressor
  from sklearn.exceptions import ConvergenceWarning, NotFittedError
  from sklearn.linear_model import LinearRegression, LogisticRegression, Ridge, RidgeClassifier
  from sklearn.model_selection import KFold, StratifiedKFold, train_test_split
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.neural_network import MLPClassifier
  from sklearn.preprocessing import scale
  from sklearn.svm import SVC, LinearSVC, LinearSVR
  from sklearn.utils._mocking import CheckingClassifier
  from sklearn.utils._testing import assert_allclose, assert_allclose_dense_sparse, ignore_warnings
  from sklearn.utils.fixes import COO_CONTAINERS, CSC_CONTAINERS, CSR_CONTAINERS
label_desc: Use image node_id 11 for calling a global function with example usage: test_stacking_randomness(estimator, X, y) without return types