code: def buildModelCheckCoeff(
      train1,
      train2,
      predict_frame_correct,
      x,
      knotsIDs,
      y,
      gamX,
      spline_order,
      family,
  ):
      numKnots = [3, 4, 5]
      scale = [0.001, 0.001, 0.001]
      bs_type = [2, 2, 2]
  
      # building multiple models with same training / test datasets to make sure it works
      h2o_model = H2OGeneralizedAdditiveEstimator(
          family=family,
          gam_columns=gamX,
          scale=scale,
          bs=bs_type,
          keep_gam_cols=True,
          spline_orders=spline_order,
          num_knots=numKnots,
          seed=12345,
          knot_ids=knotsIDs,
      )
      h2o_model.train(
          x=x, y=y, training_frame=train1, validation_frame=train2
      )
      predict_frame_test = h2o_model.predict(train2)
      if predict_frame_test.ncol > 1:
          pyunit_utils.compare_frames_local(
              predict_frame_correct[:, [1, 2]],
              predict_frame_test[:, [1, 2]],
              prob=1.0,
          )
      else:
          pyunit_utils.compare_frames_local(
              predict_frame_correct, predict_frame_test, prob=1.0
          )
  
imports: from past.utils import old_div
  import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
label_desc: Use image node_id 3 for calling a global function with example usage: buildModelCheckCoeff(train1, train2, predict_frame_correct, x, knotsIDs, y, gamX, spline_order, family) without return types