code: def test_fit(self):
      auto_xgb_reg = AutoXGBRegressor(
          cpus_per_trial=2,
          name="auto_xgb_regressor",
          tree_method="hist",
      )
      data, validation_data = get_data()
      auto_xgb_reg.fit(
          data=data,
          validation_data=validation_data,
          search_space=get_xgb_search_space(),
          n_sampling=4,
          epochs=1,
          metric="mae",
      )
      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 get_xgb_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 3 for calling the TestAutoXGBRegressor obj's underlying member method code with example usage: obj.test_fit() without return types