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)
  
file_path: DALI/dali/test/python/auto_aug/test_select.py
imports: import os
  import numpy
  from nose2.tools import params
  from nvidia.dali import fn, pipeline_def, types
  from nvidia.dali.auto_aug.core import augmentation, select
  from test_utils import get_dali_extra_path, check_batch
label_desc: Use image node_id 1 for calling a global function with example usage: sample_info(cb) and returns: fn, np