code: def get_min_shape_helper(batch, max_shape):
      """For batch=None or batch=True, we use batch mode which requires fixed shape.
      In that case min and max shape for RandomSampleIterator need to be equal.
      `batch` can also be a string "dataset" that indicates we passed a Dataset object as input
      without specifying the batch mode through: Input(dataset, batch=...)
      """
      if batch is None or batch is True:
          return max_shape
      else:
          return None
  
imports: import numpy
  import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.plugin.tf
  import tensorflow
  from nose.tools import nottest
  from nvidia.dali import pipeline_def
  from test_utils import RandomlyShapedDataIterator
label_desc: Use image node_id 1 for calling a global function with example usage: get_min_shape_helper(batch, max_shape) and returns: max_shape, None