code: def test_spark_df(self):
      df, val_df, feature_cols, label_cols = get_spark_df()
      auto_xgb_reg = AutoXGBRegressor(
          cpus_per_trial=2,
          name="auto_xgb_regressor",
          tree_method="hist",
      )
      search_space = get_xgb_search_space()
      auto_xgb_reg.fit(
          data=df,
          epochs=1,
          validation_data=val_df,
          metric="logloss",
          metric_mode="min",
          search_space=search_space,
          n_sampling=2,
          feature_cols=feature_cols,
          label_cols=label_cols,
      )
      best_model = auto_xgb_reg.get_best_model()
      assert 5 <= best_model.n_estimators <= 10
      assert 2 <= best_model.max_depth <= 5
      best_config = auto_xgb_reg.get_best_config()
      assert all(k in best_config.keys() for k in search_space.keys())
  
file_path: BigDL/python/orca/test/bigdl/orca/automl/xgboost/test_auto_xgb.py
imports: import pytest
  from bigdl.orca.automl.xgboost import AutoXGBRegressor
  import numpy
  from unittest import TestCase
  from bigdl.orca.automl import hp
label_desc: Use image node_id 7 for calling the TestAutoXGBRegressor obj's underlying member method code with example usage: obj.test_spark_df() without return types