code: def checkCorrectGAMCols(h2o_model, spline_order, numKnots, gamCols):
      gam_frame = h2o.get_frame(
          h2o_model._model_json["output"]["gam_transformed_center_key"]
      )
      gam_col_names = gam_frame.names
      for ind in range(len(numKnots)):
          knot = numKnots[ind]
          order = spline_order[ind]
          col = gamCols[ind]
          true_num_gam_col = knot + order - 2
          num_gam_col = 0
          for cname in gam_col_names:
              if col in cname:
                  num_gam_col = num_gam_col + 1
          assert num_gam_col == true_num_gam_col, (
              "Expected number of gam cols for {0}: {1}, actual: {2}.  They should "
              "equal".format(col, true_num_gam_col, num_gam_col)
          )
  
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: checkCorrectGAMCols(h2o_model, spline_order, numKnots, gamCols) without return types