title: How to make padding to max sequence lengths in batch with tensorflow dataset api?
body: <p>I have for example</p>
  
  <pre><code>123
  1234
  12345
  1234556
  1234567890
  </code></pre>
  
  <p>It is easy to make global padding like this</p>
  
  <pre><code>0000000123
  0000001234
  0000012345
  0001234556
  1234567890
  </code></pre>
  
  <p>But I wanna padding in every generated by dataset api batch.
  For example with batch size 3 it take 3 random samples</p>
  
  <pre><code>123
  1234
  12345
  </code></pre>
  
  <p>And pad it like this</p>
  
  <pre><code>00123
  01234
  12345
  </code></pre>
  
  <p>I can do it in numpy for example, but this is how batches constructed in tf api:</p>
  
  <pre><code>data = tf.data.Dataset.from_tensor_slices((X, y))
  data = data.apply(tf.data.experimental.shuffle_and_repeat(buffer_size=len(y)))
  data = data.batch(batch_size, drop_remainder=False)
  data = data.prefetch(2)
  </code></pre>