code: def test_bo_set_history():
      n_samples = 10
      domain = Domain({"a": {"b": [2, 3]}, "c": [0, 0.1]})
      history = [
          base.HistoryPoint(
              domain.sample(), {"score": base.EvaluationScore(float(i))}
          )
          for i in range(n_samples)
      ]
      bayes_opt = bo.BayesianOptimisation(domain, seed=7)
      bayes_opt.history = history
      assert bayes_opt.history == history
      assert (
          len(bayes_opt._data_x)
          == len(bayes_opt._data_fx)
          == len(history)
      )
  
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 2 for calling a global function with example usage: test_bo_set_history() without return types