code: def test_keys_and_bounds_in_same_order():
      pbounds = {
          "p1": (0, 1),
          "p3": (0, 3),
          "p2": (0, 2),
          "p4": (0, 4),
      }
      space = TargetSpace(target_func, pbounds)
  
      assert space.dim == len(pbounds)
      assert space.empty
      assert space.keys == ["p1", "p2", "p3", "p4"]
      assert all(space.bounds[:, 0] == np.array([0, 0, 0, 0]))
      assert all(space.bounds[:, 1] == np.array([1, 2, 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 2 for calling a global function with example usage: test_keys_and_bounds_in_same_order() without return types