code: def test_stacked_ensembles_are_trained_with_blending_frame_even_if_nfolds_eq_0():
      print(
          "Check that we can disable cross-validation when passing a blending frame and that Stacked Ensembles are trained using this frame."
      )
      ds = import_dataset()
      aml = H2OAutoML(
          project_name="py_aml_blending_frame",
          seed=1,
          max_models=5,
          nfolds=0,
      )
      aml.train(
          y=ds.target,
          training_frame=ds.train,
          blending_frame=ds.valid,
          leaderboard_frame=ds.test,
      )
  
      se = get_partitioned_model_names(aml.leaderboard).se
      assert (
          len(se) == 2
      ), "In blending mode, StackedEnsemble should still be trained in spite of nfolds=0."
      for m in se:
          model = h2o.get_model(m)
          assert (
              model.params["blending_frame"]["actual"]["name"]
              == ds.valid.frame_id
          )
          assert (
              model._model_json["output"]["stacking_strategy"]
              == "blending"
          )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/automl/pyunit_automl_stacked_ensembles.py
imports: import sys, os
  import h2o
  from h2o.automl import H2OAutoML, get_leaderboard
  from tests import pyunit_utils
  from _automl_utils import import_dataset, get_partitioned_model_names
label_desc: Use image node_id 2 for calling a global function with example usage: test_stacked_ensembles_are_trained_with_blending_frame_even_if_nfolds_eq_0() without return types