code: def test_data_creator(self):
      train_data_creator, val_data_creator = get_data_creators()
      auto_xgb_reg = AutoXGBRegressor(
          cpus_per_trial=2,
          name="auto_xgb_regressor",
          tree_method="hist",
      )
      model_search_space = get_xgb_search_space()
      # todo: change to hp.choice_n
      search_space = {
          "features": hp.sample_from(
              lambda spec: np.random.choice(["f1", "f2", "f3"], size=2)
          )
      }
      search_space.update(model_search_space)
      auto_xgb_reg.fit(
          data=train_data_creator,
          epochs=1,
          validation_data=val_data_creator,
          metric="logloss",
          metric_mode="min",
          search_space=search_space,
          n_sampling=2,
      )
      best_config = auto_xgb_reg.get_best_config()
      assert all(k in best_config.keys() for k in search_space.keys())
      assert len(best_config["features"]) == 2
  
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 6 for calling the TestAutoXGBRegressor obj's underlying member method code with example usage: obj.test_data_creator() without return types