code: def grabRuntimeInfo(model, training_data, x_indices, y_index=0):
      """
      This function will train the passed model with the max_runtime_secs set to be too short.  Want to make sure
      a warning message is received.
  
      :param model: model to be evaluated
      :param training_data: H2OFrame containing training dataset
      :param x_indices: prediction input indices to model.train
      :param y_index: response index to model.train
      :return: None
      """
  
      global max_runtime_secs_small
      unsupervised = (
          ("glrm" in model.algo)
          or ("pca" in model.algo)
          or ("kmeans" in model.algo)
      )
  
      if unsupervised:
          model.train(
              x=x_indices,
              training_frame=training_data,
              max_runtime_secs=max_runtime_secs_small,
          )
          model.model_performance(training_data).show()
      else:
          if "word2vec" in model.algo:
              model.train(
                  training_frame=training_data,
                  max_runtime_secs=max_runtime_secs_small,
              )
          else:
              model.train(
                  x=x_indices,
                  y=y_index,
                  training_frame=training_data,
                  max_runtime_secs=max_runtime_secs_small,
              )
              model.model_performance(training_data).show()
  
      print(
          "Model: {0}, \nActual_model_runtime_sec: {1}, "
          "\nNumber of epochs/iterations/trees : {2}".format(
              model.algo,
              model._model_json["output"]["run_time"] / 1000.0,
              checkIteration(model),
          )
      )
  
file_path: h2o-3/h2o-py/tests/testdir_jira/pyunit_pubdev_4802_short_max_runtime_secs.py
imports: import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.deeplearning import H2ODeepLearningEstimator
  from h2o.estimators.gbm import H2OGradientBoostingEstimator
  from h2o.estimators.glm import H2OGeneralizedLinearEstimator
  from h2o.estimators.glrm import H2OGeneralizedLowRankEstimator
  from h2o.estimators.kmeans import H2OKMeansEstimator
  from h2o.estimators.pca import H2OPrincipalComponentAnalysisEstimator
  from h2o.estimators.random_forest import H2ORandomForestEstimator
  from h2o.estimators.word2vec import H2OWord2vecEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: grabRuntimeInfo(model, training_data, x_indices, y_index) without return types