code: def test_easy_ensemble_classifier(n_estimators, estimator):
      # Check classification for various parameter settings.
      X, y = make_imbalance(
          iris.data,
          iris.target,
          sampling_strategy={0: 20, 1: 25, 2: 50},
          random_state=0,
      )
      X_train, X_test, y_train, y_test = train_test_split(
          X, y, random_state=0
      )
  
      eec = EasyEnsembleClassifier(
          n_estimators=n_estimators,
          estimator=estimator,
          n_jobs=-1,
          random_state=RND_SEED,
      )
      eec.fit(X_train, y_train).score(X_test, y_test)
      assert len(eec.estimators_) == n_estimators
      for est in eec.estimators_:
          assert (
              len(est.named_steps["classifier"])
              == estimator.n_estimators
          )
      # test the different prediction function
      eec.predict(X_test)
      eec.predict_proba(X_test)
      eec.predict_log_proba(X_test)
      eec.decision_function(X_test)
  
imports: import numpy
  import pytest
  import sklearn
  from sklearn.datasets import load_iris, make_hastie_10_2
  from sklearn.ensemble import AdaBoostClassifier
  from sklearn.feature_selection import SelectKBest
  from sklearn.model_selection import GridSearchCV, train_test_split
  from sklearn.utils._testing import assert_allclose, assert_array_equal
  from sklearn.utils.fixes import parse_version
  from imblearn.datasets import make_imbalance
  from imblearn.ensemble import EasyEnsembleClassifier
  from imblearn.pipeline import make_pipeline
  from imblearn.under_sampling import RandomUnderSampler
label_desc: Use image node_id 1 for calling a global function with example usage: test_easy_ensemble_classifier(n_estimators, estimator) without return types