code: def test_clone_params_fail():
      class Perceptron(object):
          def __init__(
              self,
              eta=0.1,
              epochs=50,
              random_seed=None,
              print_progress=0,
          ):
              self.eta = eta
              self.epochs = epochs
              self.random_seed = random_seed
              self.print_progress = print_progress
              self._is_fitted = False
  
          def _fit(self, X, y, init_params=True):
              self._check_target_array(y, allowed={(0, 1)})
              y_data = np.where(y == 0, -1.0, 1.0)
  
              if init_params:
                  self.b_, self.w_ = self._init_params(
                      weights_shape=(X.shape[1], 1),
                      bias_shape=(1,),
                      random_seed=self.random_seed,
                  )
                  self.cost_ = []
  
              rgen = np.random.RandomState(self.random_seed)
              for i in range(self.epochs):
                  errors = 0
  
                  for idx in self._yield_minibatches_idx(
                      rgen=rgen,
                      n_batches=y_data.shape[0],
                      data_ary=y_data,
                      shuffle=True,
                  ):
                      update = self.eta * (
                          y_data[idx] - self._to_classlabels(X[idx])
                      )
                      self.w_ += (update * X[idx]).reshape(
                          self.w_.shape
                      )
                      self.b_ += update
                      errors += int(update != 0.0)
  
                  if self.print_progress:
                      self._print_progress(
                          iteration=i + 1,
                          n_iter=self.epochs,
                          cost=errors,
                      )
                  self.cost_.append(errors)
              return self
  
          def _net_input(self, X):
              """Net input function"""
              return (np.dot(X, self.w_) + self.b_).flatten()
  
          def _to_classlabels(self, X):
              return np.where(self._net_input(X) < 0.0, -1.0, 1.0)
  
          def _predict(self, X):
              return np.where(self._net_input(X) < 0.0, 0, 1)
  
      expect = (
          "Cannot clone object. You should provide an"
          " instance of scikit-learn estimator instead of a class."
      )
  
      assert_raises(
          TypeError,
          expect,
          EFS,
          Perceptron,
          min_features=2,
          max_features=2,
          clone_estimator=True,
      )
  
imports: import numpy
  import pandas
  from numpy.testing import assert_almost_equal
  from packaging.version import Version
  from sklearn import __version__
  from sklearn.datasets import load_iris
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.linear_model import LinearRegression
  from sklearn.model_selection import GroupKFold
  from sklearn.neighbors import KNeighborsClassifier
  from mlxtend.classifier import SoftmaxRegression
  from mlxtend.data import boston_housing_data
  from mlxtend.feature_selection import ExhaustiveFeatureSelector
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 10 for calling a global function with example usage: test_clone_params_fail() and returns: self, unknown, np, np