code: def test_max():
      PBOUNDS = {"p1": (0, 10), "p2": (1, 100)}
      space = TargetSpace(target_func, PBOUNDS)
  
      assert space.max() == None
      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})
      assert space.max() == {"params": {"p1": 5, "p2": 4}, "target": 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 14 for calling a global function with example usage: test_max() without return types