code: def test_out_of_bound(
      transform: transforms.Transform,
      x: tp.List[float],
      expected: tp.Optional[tp.Type[Exception]],
  ) -> None:
      if expected is None:
          transform.backward(np.array(x))
      else:
          with pytest.raises(expected):
              transform.backward(np.array(x))
  
file_path: nevergrad/nevergrad/parametrization/test_transforms.py
imports: import typing
  import pytest
  import numpy
  from ..common import testing
  from .None import transforms
label_desc: Use image node_id 3 for calling a global function with example usage: test_out_of_bound(transform, x, expected) without return types