code: def test_bo_update_and_reset():
      domain = Domain(
          {"a": {"b": [2, 3], "d": {"f": [3, 4]}}, "c": [0, 0.1]}
      )
      bayes_opt = bo.BayesianOptimisation(domain, seed=7)
      samples = []
      n_reps = 3
      for i in range(n_reps):
          samples.extend(
              bayes_opt.run_step(batch_size=1, minimise=False)
          )
          bayes_opt.update(samples[-1], base.EvaluationScore(2.0 * i))
      assert len(bayes_opt._data_x) == n_reps
      assert len(bayes_opt._data_fx) == n_reps
      assert np.all(
          bayes_opt._data_x
          == np.array(
              [bayes_opt._convert_to_gpyopt_sample(s) for s in samples]
          )
      )
      assert np.all(
          bayes_opt._data_fx
          == 2.0 * np.arange(n_reps).reshape(n_reps, 1)
      )
      bayes_opt.reset()
      assert len(bayes_opt.history) == 0
  
file_path: hypertunity/hypertunity/optimisation/tests/test_bo.py
imports: import GPy
  import numpy
  import pytest
  from hypertunity.domain import Domain
  from hypertunity.optimisation import base, bo
  from .None import _common
label_desc: Use image node_id 1 for calling a global function with example usage: test_bo_update_and_reset() without return types