code: def padded_batch(dataset, batch_size, padded_shapes=None):
      padded_shapes = padded_shapes or dict(
          [
              (name, [None] * len(shape))
              for name, shape in dataset.output_shapes.items()
          ]
      )
      return dataset.padded_batch(batch_size, padded_shapes)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import multiprocessing
  import random
  import six
  from six.moves import range
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import mlperf_log
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 4 for calling a global function with example usage: padded_batch(dataset, batch_size, padded_shapes) and returns: dataset