docstr: Example of minibatch:
  ::
  
      [[['p', 'l', 'a', 'y', '<PAD>', '<PAD>'],
        ['t', 'h', 'a', 't', '<PAD>', '<PAD>'],
        ['t', 'r', 'a', 'c', 'k', '<PAD>'],
        ['o', 'n', '<PAD>', '<PAD>', '<PAD>', '<PAD>'],
        ['r', 'e', 'p', 'e', 'a', 't']
       ], ...
      ]
docstr_tok: ["Example","of","minibatch",":",":",":","[","[","[","'","p","'",",","'","l","'",",","'","a","'",",","'","y","'",",","'","<","PAD",">","'",",","'","<","PAD",">","'","]",",","[","'t","'",",","'","h","'",",","'","a","'",",","'t","'",",","'","<","PAD",">","'",",","'","<","PAD",">","'","]",",","[","'t","'",",","'","r","'",",","'","a","'",",","'","c","'",",","'","k","'",",","'","<","PAD",">","'","]",",","[","'","o","'",",","'n","'",",","'","<","PAD",">","'",",","'","<","PAD",">","'",",","'","<","PAD",">","'",",","'","<","PAD",">","'","]",",","[","'","r","'",",","'","e","'",",","'","p","'",",","'","e","'",",","'","a","'",",","'t","'","]","]",",","...","]"]
code: def pad(
      self, minibatch: List[List[List[str]]]
  ) -> List[List[List[str]]]:
      """
      Example of minibatch:
      ::
  
          [[['p', 'l', 'a', 'y', '<PAD>', '<PAD>'],
            ['t', 'h', 'a', 't', '<PAD>', '<PAD>'],
            ['t', 'r', 'a', 'c', 'k', '<PAD>'],
            ['o', 'n', '<PAD>', '<PAD>', '<PAD>', '<PAD>'],
            ['r', 'e', 'p', 'e', 'a', 't']
           ], ...
          ]
      """
      # If we change the same minibatch object then the underlying data
      # will get corrupted. Hence deep copy the minibatch object.
      padded_minibatch = copy.deepcopy(minibatch)
  
      max_sentence_length = self.pad_length(
          max(len(sent) for sent in minibatch)
      )
      max_word_length = self.pad_length(
          max(len(word) for sent in minibatch for word in sent)
      )
      max_word_length = min(self.max_word_length, max_word_length)
  
      for i, sentence in enumerate(minibatch):
          for j, word in enumerate(sentence):
              char_padding = [self.pad_token] * (
                  max_word_length - len(word)
              )
              padded_minibatch[i][j].extend(char_padding)
              padded_minibatch[i][j] = padded_minibatch[i][j][
                  :max_word_length
              ]
          if len(sentence) < max_sentence_length:
              for _ in range(max_sentence_length - len(sentence)):
                  char_padding = [self.pad_token] * max_word_length
                  padded_minibatch[i].append(char_padding)
  
      return padded_minibatch
  
file_path: pytext/pytext/fields/char_field.py
imports: import copy
  from collections import Counter
  from typing import List
  import torch
  from pytext.common.constants import VocabMeta
  from pytext.legacy import data, vocab
  from pytext.utils.data import no_tokenize
  from .field import VocabUsingField
label_desc: Use image node_id 3 for calling the CharFeatureField obj's underlying member method code with example usage: obj.pad(minibatch) and returns: padded_minibatch