code: def test_res():
      PBOUNDS = {"p1": (0, 10), "p2": (1, 100)}
      space = TargetSpace(target_func, PBOUNDS)
  
      assert space.res() == []
      space.probe(params={"p1": 1, "p2": 2})
      space.probe(params={"p1": 5, "p2": 4})
      space.probe(params={"p1": 2, "p2": 3})
      space.probe(params={"p1": 1, "p2": 6})
  
      expected_res = [
          {"params": {"p1": 1, "p2": 2}, "target": 3},
          {"params": {"p1": 5, "p2": 4}, "target": 9},
          {"params": {"p1": 2, "p2": 3}, "target": 5},
          {"params": {"p1": 1, "p2": 6}, "target": 7},
      ]
      assert len(space.res()) == 4
      assert space.res() == expected_res
  
imports: import pytest
  import numpy
  from bayes_opt.constraint import ConstraintModel
  from bayes_opt.target_space import TargetSpace
  from bayes_opt.util import NotUniqueError
label_desc: Use image node_id 17 for calling a global function with example usage: test_res() without return types