code: def check_no_slice(device, dtype, batch_size, num_threads):
      @pipeline_def(
          batch_size=batch_size, num_threads=num_threads, device_id=0
      )
      def make_pipe():
          encoded, _ = fn.readers.caffe(
              path=caffe_db_folder, random_shuffle=False
          )
          image = fn.decoders.image(
              encoded, device="cpu", output_type=types.RGB
          )
          if device == "gpu":
              image = image.gpu()
          image = fn.cast(image, dtype=dtype)
          sliced1 = fn.slice(image, 0, 3, axes=(2,))
          sliced2 = fn.slice(
              image,
              rel_start=(0, 0, 0),
              rel_end=(1, 1, 1),
              axis_names="HWC",
          )
          return image, sliced1, sliced2
  
      pipe = make_pipe()
      pipe.build()
      for _ in range(3):
          outs = pipe.run()
          nouts = len(outs)
          in_img = as_array(outs[0][0])
          for out_idx in range(1, nouts):
              out_img = as_array(outs[out_idx][0])
              np.testing.assert_array_equal(in_img, out_img)
  
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 21 for calling a global function with example usage: check_no_slice(device, dtype, batch_size, num_threads) and returns: image,  sliced1,  sliced2