code: def get_no_arg_callback(
      dtype, iter_limit=1000, batch_size=None, dense=True
  ):
      class Callable:
          def __init__(self):
              self.counter = 0
  
          def __call__(self):
              size = (self.counter % 16 + 3,)
              bs = 1 if batch_size is None else batch_size
              if self.counter // bs > iter_limit:
                  self.counter = 0
                  raise StopIteration()
              curr_counter = self.counter
              self.counter += 1
              if batch_size is None:
                  result = np.full(size, curr_counter, dtype=dtype)
                  return result
              else:
                  result = [
                      np.full(size, curr_counter, dtype=dtype)
                  ] * batch_size
                  for i, elem in enumerate(result):
                      elem[0] = i
                  return np.stack(result)
  
      return Callable()
  
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 4 for calling a global function with example usage: get_no_arg_callback(dtype, iter_limit, batch_size, dense) and returns: Callable, result, np