code: def caffe2_pipe(caffe2_op, path, label_type):
      if label_type == 4:
          data = caffe2_op(path=path, label_type=label_type)
          return data
      else:
          data, label = caffe2_op(path=path, label_type=label_type)
          return data, label
  
imports: from nvidia.dali import Pipeline, pipeline_def
  import nvidia.dali.ops
  import nvidia.dali.fn
  import nvidia.dali.types
  from numpy.testing import assert_array_equal
  import os
  from test_utils import compare_pipelines
  from test_utils import get_dali_extra_path
label_desc: Use image node_id 6 for calling a global function with example usage: caffe2_pipe(caffe2_op, path, label_type) and returns: data, data,  label