code: def test_y_max():
      space = TargetSpace(target_func, PBOUNDS)
      assert space._target_max() == None
      space.probe(params={"p1": 1, "p2": 7})
      space.probe(params={"p1": 0.5, "p2": 1})
      space.probe(params={"p1": 0, "p2": 1})
      assert space._target_max() == 8
  
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 11 for calling a global function with example usage: test_y_max() without return types