code: def test_update():
      domain = Domain({"x": [-5.0, 6.0]})
      rs = random.RandomSearch(domain)
      rs.update([domain.sample() for _ in range(4)], list(range(4)))
      rs.update(domain.sample(), {"score": 23.0})
      rs.update(domain.sample(), 2.0)
      assert len(rs.history) == 6
      rs.reset()
      assert len(rs.history) == 0
  
imports: from hypertunity.domain import Domain
  from hypertunity.optimisation import random
  from .None import _common
label_desc: Use image node_id 3 for calling a global function with example usage: test_update() without return types