code: def prepare_data(blending=True):
      train = h2o.import_file(
          path=pu.locate("smalldata/testng/higgs_train_5k.csv")
      )
      test = h2o.import_file(
          path=pu.locate("smalldata/testng/higgs_test_5k.csv")
      )
      target = "response"
      for fr in [train, test]:
          fr[target] = fr[target].asfactor()
      ds = pu.ns(x=train.columns, y=target, train=train, test=test)
  
      if blending:
          train, blend = train.split_frame(ratios=[0.7], seed=seed)
          return ds.extend(train=train, blend=blend)
      else:
          return ds
  
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 1 for calling a global function with example usage: prepare_data(blending) and returns: ds, ds