code: def test_blending_mode_usually_performs_worse_than_CV_stacking_mode():
      perfs = {}
      for blending in [True, False]:
          ds = prepare_data(blending=blending)
          base_models = train_base_models(ds)
          se_model = train_stacked_ensemble(ds, base_models)
          perf = se_model.model_performance(test_data=ds.test)
          perfs[se_model.stacking_strategy()] = perf
  
      # this performance difference is not guaranteed, but usually expected
      assert (
          perfs["blending"].auc() < perfs["cross_validation"].auc()
      ), (
          "SE blending should perform worse than CV stacking, but obtained: "
          "AUC (blending) = {}, AUC (CV stacking) = {}".format(
              perfs["blending"].auc(), perfs["cross_validation"].auc()
          )
      )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/stackedensemble/pyunit_stackedensemble_blending_frame.py
imports: import h2o
  import sys
  from h2o.estimators.random_forest import H2ORandomForestEstimator
  from h2o.estimators.gbm import H2OGradientBoostingEstimator
  from h2o.estimators.stackedensemble import H2OStackedEnsembleEstimator
  from tests import pyunit_utils
label_desc: Use image node_id 5 for calling a global function with example usage: test_blending_mode_usually_performs_worse_than_CV_stacking_mode() without return types