code: def test_update():
      task, target = get_sample_task()
      tuner = autotvm.tuner.XGBTuner(task)
      n_records = 5
      records = get_sample_records(n=n_records)
      tuner.update(
          [inp for inp, _ in records], [res for _, res in records]
      )
      assert len(tuner.xs) == n_records
      assert len(tuner.ys) == n_records
      assert len(tuner.visited) == n_records
      assert all(x in tuner.visited for x in tuner.xs)
  
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 5 for calling a global function with example usage: test_update() without return types