code: def test_tuner():
      task, target = get_sample_task()
      records = get_sample_records(n=10)
  
      tuner = autotvm.tuner.XGBTuner(task)
      tuner.load_history(records, min_seed_records=10)
      # Confirm that loading history successfully loaded a
      # base_model.
      assert tuner.cost_model.base_model is not None
  
      tuner = autotvm.tuner.XGBTuner(task)
      tuner.load_history(records, min_seed_records=11)
      # Confirm that loading history did not load base_model
      # when not enough records according to `min_seed_records`
      # are provided
      assert tuner.cost_model.base_model is None
  
file_path: tvm/tests/python/autotvm/test_autotvm_xgboost_model.py
imports: import time
  import multiprocessing
  import numpy
  import tvm
  from tvm import te
  from tvm import autotvm
  from tvm.autotvm import MeasureInput, MeasureResult
  from tvm.autotvm.tuner.xgboost_cost_model import XGBoostCostModel
  from tvm.testing.autotvm import get_sample_task, get_sample_records
label_desc: Use image node_id 4 for calling a global function with example usage: test_tuner() without return types