code: def test_set_bounds():
      pbounds = {
          "p1": (0, 1),
          "p3": (0, 3),
          "p2": (0, 2),
          "p4": (0, 4),
      }
      space = TargetSpace(target_func, pbounds)
  
      # Ignore unknown keys
      space.set_bounds({"other": (7, 8)})
      assert all(space.bounds[:, 0] == np.array([0, 0, 0, 0]))
      assert all(space.bounds[:, 1] == np.array([1, 2, 3, 4]))
  
      # Update bounds accordingly
      space.set_bounds({"p2": (1, 8)})
      assert all(space.bounds[:, 0] == np.array([0, 1, 0, 0]))
      assert all(space.bounds[:, 1] == np.array([1, 8, 3, 4]))
  
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 18 for calling a global function with example usage: test_set_bounds() without return types