code: def test_early_stop_gbm():
      random.seed(1)
      np.random.seed(1)
  
      data = generate_baseline_data(include_cat=True)
      data_hex = h2o.H2OFrame(
          data,
          destination_frame="data_cat",
          column_types=[
              "enum",
              "real",
              "real",
              "real",
              "real",
              "real",
              "enum",
          ],
      )
  
      frames = data_hex.split_frame(
          [0.8], ["train_cat", "validate_cat"], seed=1
      )
  
      train_it(frames, ["x0", "x1", "x2", "x3", "x4", "c"])
  
file_path: h2o-3/h2o-py/tests/testdir_misc/pyunit_pubdev_4697_early_stop_gbm.py
imports: import sys
  import h2o
  from tests import pyunit_utils
  import random
  from h2o.estimators.gbm import H2OGradientBoostingEstimator
  import numpy
  import pandas
  from sklearn import datasets
label_desc: Use image node_id 2 for calling a global function with example usage: test_early_stop_gbm() without return types