code: def test_define_dataset():
      family = "multinomial"  # can be any valid GLM families
      nrow = 10000
      ncol = 10
      realFrac = 0.4
      intFrac = 0.3
      enumFrac = 0.3
      missing_fraction = 0
      factorRange = 50
      numericRange = 10
      targetFactor = 4  # number of class for multinomial
      numGamCols = 3
      seed = 54321
  
      assert numGamCols <= ncol * realFrac, (
          "Number of real columns {0} should exceed the number of gam columns "
          "{1}".format(ncol * realFrac, numGamCols)
      )  # gam can be only real columns
      gamDataSet = generate_dataset(
          family,
          nrow,
          ncol,
          realFrac,
          intFrac,
          enumFrac,
          missing_fraction,
          factorRange,
          numericRange,
          targetFactor,
          numGamCols,
          seed,
      )
      # h2o.download_csv(gamDataSet, "/Users/wendycwong/temp/dataset.csv") # save dataset
      # np.save('/Users/wendycwong/temp/datasetTypes.npy', gamDataSet.types)
  
      assert (
          gamDataSet.nrow == nrow
      ), "Dataset number of row: {0}, expected number of row: {1}".format(
          gamDataSet.nrow, nrow
      )
      assert gamDataSet.ncol == (1 + ncol), (
          "Dataset number of row: {0}, expected number of row: "
          "{1}".format(gamDataSet.ncol, (1 + ncol))
      )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/gam/pyunit_generate_synthetic_GAM_data.py
imports: import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
  from random import random
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: test_define_dataset() without return types