code: def check_pad_wrong_axes(device, wrong_axes_range=None):
      @pipeline_def(batch_size=1, num_threads=1, device_id=0)
      def make_pipe():
          fake_data = types.Constant(
              0, shape=[10, 10, 3], dtype=types.FLOAT, device=device
          )
          axes = fn.random.uniform(
              range=wrong_axes_range, shape=(2,), dtype=types.INT32
          )
          padded = fn.pad(fake_data, axes=axes)
          return padded
  
      p = make_pipe()
      p.build()
      # Note: [[] and []] are '[' and ']' characters.
      assert_raises(
          RuntimeError,
          p.run,
          glob="Axis * out of range. Expected range is [[]-3, 2[]] for a 3D input",
      )
  
imports: import numpy
  import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.math
  import nvidia.dali.ops
  import nvidia.dali.types
  from nvidia.dali import Pipeline, pipeline_def
  from nvidia.dali.backend_impl import TensorListGPU
  from nose_utils import assert_raises
  from test_utils import RandomlyShapedDataIterator, generator_random_axes_for_3d_input, generator_random_data, as_array
label_desc: Use image node_id 13 for calling a global function with example usage: check_pad_wrong_axes(device, wrong_axes_range) and returns: padded