class_docstr: Class for loading data.
docstr: Pad the batch to be stroke-5 bigger format as described in paper.
docstr_tok: ["Pad","the","batch","to","be","stroke-5","bigger","format","as","described","in","paper","."]
code: def pad_batch(self, batch, max_len):
      """Pad the batch to be stroke-5 bigger format as described in paper."""
      result = np.zeros((self.batch_size, max_len + 1, 5), dtype=float)
      assert len(batch) == self.batch_size
      for i in range(self.batch_size):
          l = len(batch[i])
          assert l <= max_len
          result[i, 0:l, 0:2] = batch[i][:, 0:2]
          result[i, 0:l, 3] = batch[i][:, 2]
          result[i, 0:l, 2] = 1 - result[i, 0:l, 3]
          result[i, l:, 4] = 1
          # put in the first token, as described in sketch-rnn methodology
          result[i, 1:, :] = result[i, :-1, :]
          result[i, 0, :] = 0
          result[i, 0, 2] = self.start_stroke_token[
              2
          ]  # setting S_0 from paper.
          result[i, 0, 3] = self.start_stroke_token[3]
          result[i, 0, 4] = self.start_stroke_token[4]
      return result
  
imports: import random
  import numpy
label_desc: Use image node_id 10 for calling the DataLoader obj's underlying member method code with example usage: obj.pad_batch(batch, max_len) and returns: result