code: def check_slice_named_args_errors(device, batch_size):
      test_data_shape = [5, 4, 3]
  
      def get_data():
          out = [
              np.random.randint(
                  0, 255, size=test_data_shape, dtype=np.uint8
              )
              for _ in range(batch_size)
          ]
          return out
  
      pipe = Pipeline(batch_size=batch_size, num_threads=4, device_id=0)
  
      with pipe:
          data = fn.external_source(source=get_data, layout="HWC")
          start = np.array([1, 2])
          shape = np.array([3, 1])
          outs = [
              fn.slice(
                  data,
                  start,
                  shape,
                  start=start,
                  end=start + shape,
                  shape=shape,
                  axes=(0, 1),
              ),
          ]
          pipe.set_outputs(*outs)
  
      with assert_raises(
          RuntimeError,
          glob='"end", "rel_end", "shape", and "rel_shape" arguments are mutually exclusive',
      ):
          pipe.build()
          for _ in range(1):
              outs = 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 19 for calling a global function with example usage: check_slice_named_args_errors(device, batch_size) and returns: out