code: def test_StackingEstimator_1():
      """Assert that the StackingEstimator returns transformed X with synthetic features in classification."""
      clf = RandomForestClassifier(random_state=42)
      stack_clf = StackingEstimator(
          estimator=RandomForestClassifier(random_state=42)
      )
      # fit
      clf.fit(training_features, training_target)
      stack_clf.fit(training_features, training_target)
      # get transformd X
      X_clf_transformed = stack_clf.transform(training_features)
  
      assert np.allclose(
          clf.predict(training_features), X_clf_transformed[:, 0]
      )
      assert np.allclose(
          clf.predict_proba(training_features),
          X_clf_transformed[:, 1 : 1 + len(np.unique(training_target))],
      )
  
file_path: tpot/tests/stacking_estimator_tests.py
imports: import platform
  import numpy
  from tpot.builtins import StackingEstimator
  from sklearn.linear_model import LogisticRegression, Lasso
  from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
  from sklearn.pipeline import make_pipeline
  from tpot_tests import training_features, training_target, training_features_r, training_target_r
  from sklearn.model_selection import cross_val_score
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: test_StackingEstimator_1() without return types