code: def check_slice_with_out_of_bounds_error(
      device,
      batch_size,
      input_shape=(100, 200, 3),
      normalized_anchor=False,
      normalized_shape=False,
  ):
      # This test case is written with HWC layout in mind and "HW" axes in slice arguments
      axis_names = "HW"
      axes = None
      layout = "HWC"
      assert len(input_shape) == 3
  
      eii = RandomDataIterator(batch_size, shape=input_shape)
      eii_arg = SliceArgsIterator(
          batch_size,
          len(input_shape),
          image_shape=input_shape,
          image_layout=layout,
          axes=axes,
          axis_names=axis_names,
          normalized_anchor=normalized_anchor,
          normalized_shape=normalized_shape,
          min_norm_anchor=-0.5,
          max_norm_anchor=-0.1,
          min_norm_shape=1.1,
          max_norm_shape=3.6,
      )
      pipe = SliceSynthDataPipeline(
          device,
          batch_size,
          layout,
          iter(eii),
          iter(eii_arg),
          axes=axes,
          axis_names=axis_names,
          normalized_anchor=normalized_anchor,
          normalized_shape=normalized_shape,
          out_of_bounds_policy="error",
      )
  
      pipe.build()
      with assert_raises(
          RuntimeError,
          glob="Slice can't be placed out of bounds with current policy. Got:",
      ):
          _ = pipe.run()
  
imports: from nvidia.dali import Pipeline, pipeline_def, ops, fn, types
  import numpy
  import os
  from functools import partial
  from math import floor
  from test_utils import compare_pipelines, get_dali_extra_path, RandomDataIterator, generator_random_axes_for_3d_input, generator_random_data, as_array
  from nose_utils import assert_raises
  from nose2.tools import params
label_desc: Use image node_id 13 for calling a global function with example usage: check_slice_with_out_of_bounds_error(device, batch_size, input_shape, normalized_anchor, normalized_shape) without return types