code: def test_slice_with_out_of_bounds_error():
      in_shape = (40, 80, 3)
      for cmn_op, device in op_dev_pairs:
          for batch_size in [1, 3]:
              yield raises(
                  RuntimeError,
                  "Slice can't be placed out of bounds with current policy.",
              )(
                  check_cmn_with_out_of_bounds_error
              ), cmn_op, device, batch_size, in_shape
  
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 14 for calling a global function with example usage: test_slice_with_out_of_bounds_error() without return types