code: def test_gaussian():
      # load data
      data = pd.read_csv(
          pyunit_utils.locate("smalldata/demos/item_demand.csv")
      )
      # prepare date columns
      data = prepare_date(data, "date")
  
      # aggregate data, prepare lags, remove null rows
      data = group_by_agg_lags(data)
      print("New data shape:")
      print(data.shape)
  
      # split to train and test
      train = data[data.date <= "2017-09-30"]
      print("Training data shape:")
      print(train.shape)
  
      # last 3 month for testing
      test = data[data.date > "2017-09-30"]
      print("Testing data shape:")
      print(test.shape)
  
      # load data to H2o
      train_h2o = h2o.H2OFrame(train)
      test_h2o = h2o.H2OFrame(test)
  
      # Train GBM model with gaussian
      gbm_gaussian = H2OGradientBoostingEstimator(
          model_id="sales_model",
          ntrees=50,
          max_depth=5,
          score_each_iteration=True,
          distribution="gaussian",
      )
      gbm_gaussian.train(
          y="sales", x=train_h2o.names, training_frame=train_h2o
      )
      predictions = gbm_gaussian.predict(
          test_data=test_h2o
      ).as_data_frame()
  
      items, less, more_or_perfect = evaluate(test, predictions)
      print("Non customized gaussian loss function")
      print(items, less, more_or_perfect)
  
      name = "asymmetric"
      distribution_ref = h2o.upload_custom_distribution(
          AsymmetricLossDistribution,
          func_name="custom_" + name,
          func_file="custom_" + name + ".py",
      )
  
      gbm_custom = H2OGradientBoostingEstimator(
          model_id="custom_sales_model",
          ntrees=50,
          max_depth=5,
          score_each_iteration=True,
          distribution="custom",
          custom_distribution_func=distribution_ref,
      )
      gbm_custom.train(
          y="sales", x=train_h2o.names, training_frame=train_h2o
      )
  
      predictions = gbm_custom.predict(
          test_data=test_h2o
      ).as_data_frame()
      items, less, more_or_perfect = evaluate(test, predictions)
      print("Customized gaussian loss function")
      print(items, less, more_or_perfect)
  
file_path: h2o-3/h2o-py/tests/testdir_algos/gbm/pyunit_PUBDEV_4076_custom_distribution_demo.py
imports: import sys
  import h2o
  from tests import pyunit_utils
  import pandas
  from h2o.estimators.gbm import H2OGradientBoostingEstimator
  from h2o.utils.distributions import CustomDistributionGaussian
label_desc: Use image node_id 4 for calling a global function with example usage: test_gaussian() without return types