code: def train_base_models(dataset, **kwargs):
      model_args = (
          kwargs
          if hasattr(dataset, "blend")
          else dict(
              nfolds=3,
              fold_assignment="Modulo",
              keep_cross_validation_predictions=True,
              **kwargs,
          )
      )
      gbm = H2OGradientBoostingEstimator(
          distribution="bernoulli",
          ntrees=10,
          max_depth=3,
          min_rows=2,
          learn_rate=0.2,
          seed=seed,
          **model_args,
      )
      gbm.train(x=dataset.x, y=dataset.y, training_frame=dataset.train)
  
      rf = H2ORandomForestEstimator(ntrees=20, seed=seed, **model_args)
      rf.train(x=dataset.x, y=dataset.y, training_frame=dataset.train)
      return [gbm, rf]
  
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 2 for calling a global function with example usage: train_base_models(dataset) and returns: list