code: def check_cmn_with_out_of_bounds_error(
      cmn_op, device, batch_size, input_shape=(100, 200, 3)
  ):
      # This test case is written with HWC layout in mind and "HW" axes in slice arguments
      layout = "HWC"
      assert len(input_shape) == 3
      eii = RandomDataIterator(batch_size, shape=input_shape)
      crop_y, crop_x = 0.5, 0.5
      crop_h, crop_w = input_shape[0] * 2, input_shape[1] * 2
      pipe = CMNRandomDataPipeline(
          cmn_op,
          device,
          batch_size,
          layout,
          iter(eii),
          dtype=types.FLOAT,
          output_layout=layout,
          mirror_probability=0.5,
          mean=[127.0],
          std=[127.0],
          pad_output=True,
          crop_w=crop_w,
          crop_h=crop_h,
          crop_pos_x=crop_x,
          crop_pos_y=crop_y,
          out_of_bounds_policy="error",
      )
      pipe.build()
      pipe.run()
  
imports: import numpy
  import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.ops
  import nvidia.dali.types
  import os
  from functools import partial
  from nvidia.dali import pipeline_def
  from nvidia.dali.pipeline import Pipeline
  from nose2.tools import params
  from nose_utils import assert_raises
  from nose_utils import raises
  from test_slice import check_slice_output, abs_slice_start_and_end
  from test_utils import RandomDataIterator
  from test_utils import as_array
  from test_utils import compare_pipelines, dali_type_to_np
  from test_utils import get_dali_extra_path
  import itertools
label_desc: Use image node_id 13 for calling a global function with example usage: check_cmn_with_out_of_bounds_error(cmn_op, device, batch_size, input_shape) without return types