code: def h_stats_on_synthetic_data():
      df, x, target = prepare_data()
  
      # Create the data frame
      train_frame = h2o.H2OFrame(df[x + [target]])
      train_frame[target] = train_frame[target].asfactor()
  
      # Train model
      gbm_h2o = H2OGradientBoostingEstimator(
          ntrees=100, learn_rate=0.1, max_depth=2, min_rows=1, seed=1234
      )
      gbm_h2o.train(x=x, y=target, training_frame=train_frame)
  
      xgb_h2o = H2OXGBoostEstimator(
          ntrees=100, learn_rate=0.1, max_depth=2, min_rows=1, seed=1234
      )
      xgb_h2o.train(x=x, y=target, training_frame=train_frame)
  
      # Compute H stats
      (
          x1x2_sklearn,
          x1x3_sklearn,
          x2x3_sklearn,
      ) = provide_sklearn_output_if_possible(df, x, target)
      print(
          "Sci-GBM H: ('X1', 'X2')",
          x1x2_sklearn,
          "('X1', 'X3')",
          x1x3_sklearn,
          "('X2', 'X3')",
          x2x3_sklearn,
      )
      x1x2_gbm, x1x3_gbm, x2x3_gbm = (
          gbm_h2o.h(train_frame, ["X1", "X2"]),
          gbm_h2o.h(train_frame, ["X1", "X3"]),
          gbm_h2o.h(train_frame, ["X2", "X3"]),
      )
      print(
          "H2O-GBM H: ('X1', 'X2')",
          x1x2_gbm,
          "('X1', 'X3')",
          x1x3_gbm,
          "('X2', 'X3')",
          x2x3_gbm,
      )
      x1x2_xgb, x1x3_xgb, x2x3_xgb = (
          xgb_h2o.h(train_frame, ["X1", "X2"]),
          xgb_h2o.h(train_frame, ["X1", "X3"]),
          xgb_h2o.h(train_frame, ["X2", "X3"]),
      )
      print(
          "H2O-XGB H: ('X1', 'X2')",
          x1x2_xgb,
          "('X1', 'X3')",
          x1x3_xgb,
          "('X2', 'X3')",
          x2x3_xgb,
      )
  
      # When some of the assert fail, try to tune up h2o hyperparameters first
      assert_equals(
          x1x2_sklearn,
          x1x2_gbm,
          "Not expected output: H stats should be around sklearn reference",
          0.1,
      )
      assert_equals(
          x1x3_sklearn,
          x1x3_gbm,
          "Not expected output: H stats should be around sklearn reference",
          0.1,
      )
      assert_equals(
          x2x3_sklearn,
          x2x3_gbm,
          "Not expected output: H stats should be around sklearn reference",
          0.1,
      )
      assert_equals(
          x1x2_sklearn,
          x1x2_xgb,
          "Not expected output: H stats should be around sklearn reference",
          0.1,
      )
      assert_equals(
          x1x3_sklearn,
          x1x3_xgb,
          "Not expected output: H stats should be around sklearn reference",
          0.1,
      )
      assert_equals(
          x2x3_sklearn,
          x2x3_xgb,
          "Not expected output: H stats should be around sklearn reference",
          0.1,
      )
  
file_path: h2o-3/h2o-py/tests/testdir_hstats/pyunit_h_pubdev-8768_synthetic_data.py
imports: from builtins import range
  import sys, os
  import h2o
  from tests import pyunit_utils, assert_equals
  from h2o.estimators import H2OGradientBoostingEstimator, H2OXGBoostEstimator
  import numpy
  import pandas
  import imp
label_desc: Use image node_id 3 for calling a global function with example usage: h_stats_on_synthetic_data() without return types