code: def batch_gen(max_batch_size, sample_shape_fn, dtype=np.float32):
      bs = np.random.randint(1, max_batch_size)
      data = []
      for i in range(bs):
          sample_sh = sample_shape_fn()
          data += [np.zeros(sample_sh, dtype=dtype)]
      return data
  
file_path: DALI/dali/test/python/operator_2/test_roi_random_crop.py
imports: import numpy
  import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.types
  import random
  from nose_utils import assert_raises
label_desc: Use image node_id 2 for calling a global function with example usage: batch_gen(max_batch_size, sample_shape_fn, dtype) and returns: data