code: def gam_multinomial_mojo_MS():
      h2o.remove_all()
      NTESTROWS = 200  # number of test dataset rows
      PROBLEM = "multinomial"
      params = set_params()  # set deeplearning model parameters
      df1 = pyunit_utils.random_dataset(
          PROBLEM, missing_fraction=0.001
      )  # generate random dataset
      df = pyunit_utils.random_dataset_real_only(nrow=df1.nrow, ncol=3)
      df.set_names(["gam_col1", "gam_col2", "gam_col3"])
      df = df1.cbind(df)
      dfnames = df.names
      # add GAM specific parameters
      params["gam_columns"] = []
      params["scale"] = []
      params["family"] = "multinomial"
      params["bs"] = []
      count = 0
      num_gam_cols = 3  # maximum number of gam columns
      for cname in dfnames:
          if not (cname == "response") and (
              str(df.type(cname)) == "real"
          ):
              params["gam_columns"].append(cname)
              params["scale"].append(0.001)
              params["bs"].append(3)
              count = count + 1
              if count >= num_gam_cols:
                  break
  
      train = df[NTESTROWS:, :]
      test = df[:NTESTROWS, :]
      x = list(set(df.names) - {"response"})
      TMPDIR = tempfile.mkdtemp()
      gamMultinomialModel = pyunit_utils.build_save_model_generic(
          params, x, train, "response", "gam", TMPDIR
      )  # build and save mojo model
      MOJONAME = pyunit_utils.getMojoName(gamMultinomialModel._id)
      h2o.download_csv(
          test[x], os.path.join(TMPDIR, "in.csv")
      )  # save test file, h2o predict/mojo use same file
      pred_h2o, pred_mojo = pyunit_utils.mojo_predict(
          gamMultinomialModel, TMPDIR, MOJONAME
      )  # load model and perform predict
      h2o.download_csv(pred_h2o, os.path.join(TMPDIR, "h2oPred.csv"))
      print("Comparing mojo predict and h2o predict...")
      pyunit_utils.compare_frames_local(
          pred_h2o, pred_mojo, 0.1, tol=1e-10
      )
  
imports: import sys, os
  import h2o
  from tests import pyunit_utils
  from random import randint
  import tempfile
label_desc: Use image node_id 1 for calling a global function with example usage: gam_multinomial_mojo_MS() without return types