def pad_sents(sents, pad_token):
    """ Pad list of sentences according to the longest sentence in the batch.
    @param sents (list[list[int]]): list of sentences, where each sentence
                                    is represented as a list of words
    @param pad_token (int): padding token
    @returns sents_padded (list[list[str]]): list of sentences where sentences shorter
        than the max length sentence are padded out with the pad_token, such that
        each sentences in the batch now has equal length.
    """
    sents_padded = []

    size = len(max(sents, key=len))
    for sent in sents:
        gap = size - len(sent)
        if gap > 0 :
            pad = [pad_token for i in range(gap)]
            sent.extend(pad)
        sents_padded.append(sent)

    return sents_padded