code: def test_no_model_takes_more_than_max_runtime_secs_per_model():
      print(
          "Check that individual model get interrupted after `max_runtime_secs_per_model`"
      )
      ds = import_dataset(seed=1, larger=True)
      max_runtime_secs = 30
      models_count = {}
      for max_runtime_secs_per_model in [0, 3, max_runtime_secs]:
          aml = H2OAutoML(
              project_name="py_aml_max_runtime_secs_per_model_{}".format(
                  max_runtime_secs_per_model
              ),
              seed=1,
              max_runtime_secs_per_model=max_runtime_secs_per_model,
              max_runtime_secs=max_runtime_secs,
          )
          aml.train(y=ds.target, training_frame=ds.train)
          models_count[max_runtime_secs_per_model] = len(
              aml.leaderboard
          )
          # print(aml.leaderboard)
      # there may be one model difference as reproducibility is not perfectly guaranteed in time-bound runs
      assert abs(models_count[0] - models_count[max_runtime_secs]) <= 1
      assert abs(models_count[0] - models_count[3]) > 1
  
imports: import sys, os, time
  from tests import pyunit_utils
  from h2o.automl import H2OAutoML
  from _automl_utils import import_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: test_no_model_takes_more_than_max_runtime_secs_per_model() without return types