code: def _model_build(x, y, tframe, vframe, algo, kwargs):
      kwargs["training_frame"] = tframe
      if vframe is not None:
          kwargs["validation_frame"] = vframe
      if y is not None:
          kwargs["response_column"] = tframe[y].names[0]
      kwargs = dict(
          [
              (
                  k,
                  (kwargs[k]._frame()).frame_id
                  if isinstance(kwargs[k], H2OFrame)
                  else kwargs[k],
              )
              for k in kwargs
              if kwargs[k] is not None
          ]
      )  # gruesome one-liner
      rest_ver = (
          kwargs.pop("_rest_version")
          if "_rest_version" in kwargs
          else 3
      )
      future_model = H2OModelFuture(
          H2OJob(
              h2o.api(
                  "POST /%d/ModelBuilders/%s" % (rest_ver, algo),
                  data=kwargs,
              ),
              job_type=(algo + " Model Build"),
          ),
          x,
      )
      return _resolve_model(
          future_model, _rest_version=rest_ver, **kwargs
      )
  
file_path: h2o-3/h2o-py/h2o/model/model_builder.py
imports: from h2o.utils.compatibility import *
  import h2o
  from ..frame import H2OFrame
  from ..job import H2OJob
  from .model_future import H2OModelFuture
  from .models.dim_reduction import H2ODimReductionModel
  from .models.autoencoder import H2OAutoEncoderModel
  from .models.multinomial import H2OMultinomialModel
  from .models.ordinal import H2OOrdinalModel
  from .models.regression import H2ORegressionModel
  from .models.binomial import H2OBinomialModel
  from .models.clustering import H2OClusteringModel
  from .models.word_embedding import H2OWordEmbeddingModel
label_desc: Use image node_id 2 for calling a global function with example usage: _model_build(x, y, tframe, vframe, algo, kwargs) and returns: _resolve_model