code: def test_slice_fn():
      pipe = dali.pipeline.Pipeline(1, 1, 0)
      src = fn.external_source(
          [
              [
                  np.array(
                      [[10, 11, 12], [13, 14, 15], [16, 17, 18]],
                      dtype=np.float32,
                  )
              ]
          ]
      )
      out_cpu = fn.slice(
          src, np.array([1, 1]), np.array([2, 1]), axes=[0, 1]
      )
      out_gpu = fn.slice(
          src.gpu(), np.array([1, 1]), np.array([2, 1]), axes=[0, 1]
      )
      pipe.set_outputs(out_cpu, out_gpu)
      pipe.build()
      o = pipe.run()
      assert np.array_equal(o[0].at(0), np.array([[14], [17]]))
      assert np.array_equal(o[1].as_cpu().at(0), np.array([[14], [17]]))
  
file_path: DALI/dali/test/python/operator_1/test_input_promotion.py
imports: import nvidia.dali
  import nvidia.dali.fn
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: test_slice_fn() without return types