code: def test_stackedensemble_propagates_the_max_runtime_secs():
      max_runtime_secs = 5
      hyper_parameters = dict()
      hyper_parameters["ntrees"] = [1, 3, 5]
      params = dict(
          fold_assignment="modulo",
          nfolds=3,
          keep_cross_validation_predictions=True,
      )
  
      data = prepare_data()
  
      gs1 = H2OGridSearch(
          H2OGradientBoostingEstimator(**params),
          hyper_params=hyper_parameters,
      )
      gs1.train(data.x, data.y, data.train, validation_frame=data.train)
  
      se = H2OStackedEnsembleEstimator(
          base_models=[gs1], max_runtime_secs=max_runtime_secs
      )
      se.train(data.x, data.y, data.train)
      metalearner = h2o.get_model(se.metalearner()["name"])
  
      # metalearner has the set max_runtine_secs
      assert (
          metalearner.actual_params["max_runtime_secs"]
          <= max_runtime_secs
      )
      assert metalearner.actual_params["max_runtime_secs"] > 0
  
      # stack ensemble has the set max_runtime_secs
      assert se.max_runtime_secs == max_runtime_secs
  
file_path: h2o-3/h2o-py/tests/testdir_algos/stackedensemble/pyunit_stackedensemble_max_runtime_secs.py
imports: import h2o
  import sys
  from h2o.exceptions import H2OResponseError
  from h2o.grid import H2OGridSearch
  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: test_stackedensemble_propagates_the_max_runtime_secs() without return types