code: def buildModelMetricsCheck(train_data, y, gamX, family, bs):
      numKnots = [5, 6, 7]
      x = ["C1", "C2"]
      h2o_model = H2OGeneralizedAdditiveEstimator(
          family=family,
          gam_columns=gamX,
          scale=[1, 1, 1],
          num_knots=numKnots,
          standardize=True,
          lambda_=[0],
          alpha=[0],
          max_iterations=3,
          bs=bs,
      )
      h2o_model.train(x=x, y=y, training_frame=train_data)
      if family == "binomial":
          h2o_model.auc()
          h2o_model.aic()
          h2o_model.logloss()
          h2o_model.null_deviance()
          h2o_model.residual_deviance()
      elif family == "multinomial":
          h2o_model.null_deviance()
          h2o_model.residual_deviance()
      else:
          h2o_model.mse()
          h2o_model.null_deviance()
          h2o_model.residual_deviance()
  
imports: import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: buildModelMetricsCheck(train_data, y, gamX, family, bs) without return types