code: def test_array_to_params():
      space = TargetSpace(target_func, PBOUNDS)
  
      assert space.array_to_params(np.array([2, 3])) == {
          "p1": 2,
          "p2": 3,
      }
      with pytest.raises(ValueError):
          space.array_to_params(np.array([2]))
      with pytest.raises(ValueError):
          space.array_to_params(np.array([2, 3, 5]))
  
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 4 for calling a global function with example usage: test_array_to_params() without return types