code: def test_get_xy():
      import h2o.explanation._explain as ex
  
      train = h2o.upload_file(
          pyunit_utils.locate(
              "smalldata/wine/winequality-redwhite-no-BOM.csv"
          )
      )
      y = "quality"
      x = [
          "citric acid",
          "residual sugar",
          "chlorides",
          "free sulfur dioxide",
          "total sulfur dioxide",
          "density",
          "pH",
      ]
      gbm = h2o.estimators.H2OGradientBoostingEstimator()
      gbm.train(
          x=x,
          y=y,
          training_frame=train,
          offset_column="sulphates",
          weights_column="alcohol",
          fold_column="type",
      )
  
      estimated_x, estimated_y = ex._get_xy(gbm)
      assert set(x) == set(estimated_x)
      assert y == estimated_y
  
      # test it works also without any "special" column specified
      gbm2 = h2o.estimators.H2OGradientBoostingEstimator()
      gbm2.train(x=x, y=y, training_frame=train)
  
      estimated_x, estimated_y = ex._get_xy(gbm2)
      assert set(x) == set(estimated_x)
      assert y == estimated_y
  
imports: import os
  import sys
  import pandas
  from h2o.grid import H2OGridSearch
  import matplotlib
  import h2o
  import pandas
  import matplotlib.pyplot
  from tests import pyunit_utils, test_plot_result_saving
  from h2o.automl import H2OAutoML
  from h2o.estimators import *
  from h2o.explanation._explain import H2OExplanation
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_xy() without return types