code: def test_suite_stackedensemble_base_models(blending=False):
      def test_base_models_can_be_passed_as_objects_or_as_ids():
          """This test checks the following:
          1) That passing in a list of models for base_models works.
          2) That passing in a list of models and model_ids results in the same stacked ensemble.
          """
          ds = prepare_data(blending)
          base_models = train_base_models(ds)
          se1 = train_stacked_ensemble(
              ds, [m.model_id for m in base_models]
          )
          se2 = train_stacked_ensemble(ds, base_models)
  
          # Eval train AUC to assess equivalence
          assert se1.auc() == se2.auc()
  
      return [
          pu.tag_test(test, "blending" if blending else None)
          for test in [
              test_base_models_can_be_passed_as_objects_or_as_ids
          ]
      ]
  
file_path: h2o-3/h2o-py/tests/testdir_algos/stackedensemble/pyunit_stackedensemble_base_models.py
imports: import h2o
  import sys
  from h2o.grid import H2OGridSearch
  from h2o.estimators.random_forest import H2ORandomForestEstimator
  from h2o.estimators.gbm import H2OGradientBoostingEstimator
  from h2o.estimators.stackedensemble import H2OStackedEnsembleEstimator
  from h2o.exceptions import H2OResponseError
  from h2o import get_model
  from tests import pyunit_utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_suite_stackedensemble_base_models(blending) and returns: unknown