code: def get_sample_one_arg_callback(
      dtype, iter_limit=1000, batch_size=None, dense=True
  ):
      def callback(x):
          if x.iteration > iter_limit:
              raise StopIteration()
          size = x.idx_in_batch % 16 + 1, x.iteration % 16 + 4
          result = np.full(size, x.idx_in_epoch, dtype=dtype)
          result[0][0] = x.idx_in_epoch
          result[0][1] = x.idx_in_batch
          result[0][2] = x.iteration
          result[0][3] = x.epoch_idx
          return result
  
      return callback
  
imports: import copy
  import numpy
  import nvidia.dali.plugin.tf
  import tensorflow
  from nvidia.dali import Pipeline, fn
  from test_utils import RandomlyShapedDataIterator
label_desc: Use image node_id 1 for calling a global function with example usage: get_sample_one_arg_callback(dtype, iter_limit, batch_size, dense) and returns: callback, result