def pad_batch(self, tokens: List[List[int]]):
        """ Create padded batch of words, tags, chunk pos, even batch of characters

        Params:
            tokens: list of raw words, pos, chunk, or tags.

        Returns:
            the padded batch
        """

        batch_size = len(tokens)

        if not self.char_level:
            max_len = max([len(seq) for seq in tokens])
            padded_batch = np.full((batch_size, max_len), self._t2i["<PAD>"])
            for i, seq in enumerate(tokens):
                padded_batch[i, :len(seq)] = seq
        else:
            max_len_seq = max([len(seq) for seq in tokens])
            if max_len_seq == 0:
                max_len_sub_seq = 0
            else:
                max_len_sub_seq = max([len(sub_seq) for seq in tokens for sub_seq in seq])
            padded_batch = np.full((batch_size, max_len_seq, max_len_sub_seq), self._t2i["<PAD>"])
            for i, seq in enumerate(tokens):
                for j, sub_seq in enumerate(seq):
                    padded_batch[i, j, :len(sub_seq)] = sub_seq
        return padded_batch
 Create padded batch of words, tags, chunk pos, even batch of characters

        Params:
            tokens: list of raw words, pos, chunk, or tags.

        Returns:
            the padded batch
        
deeppavlov/models/preprocessors/ner_preprocessor.py