code: def test_probe():
      PBOUNDS = {"p1": (0, 10), "p2": (1, 100)}
      space = TargetSpace(
          target_func, PBOUNDS, allow_duplicate_points=True
      )
  
      assert len(space) == 0
      # probing with dict
      space.probe(params={"p1": 1, "p2": 2})
      assert len(space) == 1
      assert all(space.params[0] == np.array([1, 2]))
      assert all(space.target == np.array([3]))
  
      # probing with array
      space.probe(np.array([5, 4]))
      assert len(space) == 2
      assert all(space.params[1] == np.array([5, 4]))
      assert all(space.target == np.array([3, 9]))
  
      # probing same point with dict
      space.probe(params={"p1": 1, "p2": 2})
      assert len(space) == 3
      assert all(space.params[1] == np.array([5, 4]))
      assert all(space.target == np.array([3, 9, 3]))
  
      # probing same point with array
      space.probe(np.array([5, 4]))
      assert len(space) == 4
      assert all(space.params[1] == np.array([5, 4]))
      assert all(space.target == np.array([3, 9, 3, 9]))
  
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 9 for calling a global function with example usage: test_probe() without return types