code: def sample_info(cb):
      def idx_in_batch_cb(sample_info):
          return np.array(cb(sample_info), dtype=np.int32)
  
      return fn.external_source(idx_in_batch_cb, batch=False)
  
imports: import numpy
  import nvidia.dali.tensors
  from nvidia.dali import pipeline_def, fn, types
  from nvidia.dali.auto_aug.core import augmentation, signed_bin
  from nvidia.dali.auto_aug.core._args import forbid_unused_kwargs
  from nose2.tools import params
  from test_utils import check_batch
  from nose_utils import assert_warns, assert_raises
label_desc: Use image node_id 1 for calling a global function with example usage: sample_info(cb) and returns: fn, np