code: def test_max_with_constraint_identical_target_value():
      PBOUNDS = {"p1": (0, 10), "p2": (1, 100)}
      constraint = ConstraintModel(lambda p1, p2: p1 - p2, -2, 2)
      space = TargetSpace(target_func, PBOUNDS, constraint=constraint)
  
      assert space.max() == None
      space.probe(params={"p1": 1, "p2": 2})  # Feasible
      space.probe(
          params={"p1": 0, "p2": 5}
      )  # Unfeasible, target value is 5, should not be selected
      space.probe(params={"p1": 5, "p2": 8})  # Unfeasible
      space.probe(
          params={"p1": 2, "p2": 3}
      )  # Feasible, target value is also 5
      space.probe(params={"p1": 1, "p2": 6})  # Unfeasible
      assert space.max() == {
          "params": {"p1": 2, "p2": 3},
          "target": 5,
          "constraint": -1,
      }
  
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 16 for calling a global function with example usage: test_max_with_constraint_identical_target_value() without return types