code: def test_default_max_runtime_if_no_max_models_provided():
      ds = import_dataset()
      aml = H2OAutoML(
          project_name="py_no_stopping_constraints",
          seed=1,
          verbosity="Info",
      )
      with pu.Timeout(5, on_timeout=lambda: aml._job.cancel()):
          try:
              aml.train(y=ds.target, training_frame=ds.train)
          except H2OJobCancelled:
              pass
          max_runtime = aml._build_resp["build_control"][
              "stopping_criteria"
          ]["max_runtime_secs"]
          max_models = aml._build_resp["build_control"][
              "stopping_criteria"
          ]["max_models"]
          assert max_runtime == 3600
          assert max_models == 0
  
file_path: h2o-3/h2o-py/tests/testdir_algos/automl/pyunit_automl_early_stopping.py
imports: import sys, os
  from h2o.exceptions import H2OJobCancelled
  from h2o.automl import H2OAutoML
  from tests import pyunit_utils
  from _automl_utils import import_dataset, get_partitioned_model_names
label_desc: Use image node_id 8 for calling a global function with example usage: test_default_max_runtime_if_no_max_models_provided() without return types