code: def index_pipe(data_source, indexing_func):
      src = data_source
  
      cpu = indexing_func(src)
      gpu = indexing_func(src.gpu())
  
      return src, cpu, gpu
  
imports: from nvidia import dali
  from nvidia.dali import fn
  import numpy
  from nvidia.dali.pipeline import Pipeline
  from nose_utils import assert_raises
label_desc: Use image node_id 1 for calling a global function with example usage: index_pipe(data_source, indexing_func) and returns: src,  cpu,  gpu