code: def kolmogorov_smirnov():
      # Train a model
      airlines = h2o.import_file(
          path=pyunit_utils.locate(
              "smalldata/testng/airlines_train.csv"
          )
      )
      model = H2OGradientBoostingEstimator(ntrees=1, gainslift_bins=20)
      model.train(
          x=["Origin", "Distance"],
          y="IsDepDelayed",
          training_frame=airlines,
      )
      verify_ks(model, airlines)
  
      model = H2OGradientBoostingEstimator(ntrees=1, gainslift_bins=5)
      model.train(
          x=["Origin", "Distance"],
          y="IsDepDelayed",
          training_frame=airlines,
      )
      ks = model.kolmogorov_smirnov()
      print(ks)
      ks_verification = ks_metric(model, airlines)
      print(ks_verification)
      assert round(ks, 5) != round(ks_verification, 5)
  
      model = H2OXGBoostEstimator(gainslift_bins=10)
      model.train(
          x=["Origin", "Distance"],
          y="IsDepDelayed",
          training_frame=airlines,
      )
      print(model.gains_lift())
      ks = model.kolmogorov_smirnov()
      assert ks is not None
      assert 0 < ks < 1
  
      # Test GS is null whern gainslift_bins = 0
      model = H2OGradientBoostingEstimator(ntrees=1, gainslift_bins=0)
      model.train(
          x=["Origin", "Distance"],
          y="IsDepDelayed",
          training_frame=airlines,
      )
      assert model.gains_lift() is None
  
imports: import sys
  import h2o
  from h2o.estimators import H2OGradientBoostingEstimator, H2OXGBoostEstimator
  from tests import pyunit_utils
label_desc: Use image node_id 1 for calling a global function with example usage: kolmogorov_smirnov() without return types