code: def test_weight_ones():
      # sample_weight = None and sample_weight = ones
      # should give the same result, provided that the
      # randomness of the models is controled
      lr = LinearRegression()
      svr_lin = SVR(kernel="linear", gamma="auto")
      ridge = Ridge(random_state=1)
      svr_rbf = SVR(kernel="rbf", gamma="auto")
      stack = StackingCVRegressor(
          regressors=[svr_lin, lr, ridge],
          meta_regressor=svr_rbf,
          cv=KFold(5, shuffle=True, random_state=5),
      )
      pred1 = stack.fit(X1, y).predict(X1)
      pred2 = stack.fit(X1, y, sample_weight=np.ones(40)).predict(X1)
      assert np.max(np.abs(pred1 - pred2)) < 1e-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 16 for calling a global function with example usage: test_weight_ones() without return types