def pad_sents(sents, pad_token):
    """ Pad list of sentences according to the longest sentence in the batch.
        The paddings should be at the end of each sentence.
    @param sents (list[list[str]]): list of sentences, where each sentence
                                    is represented as a list of words
    @param pad_token (str): 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 = []

    # Find max_length from input batch sentence
    len_x = [len(x) for x in sents]
    len_x.sort()
    max_length = len_x[-1]
    for sentence in sents:
        new_sentence = sentence + [pad_token] * (max_length - len(sentence))
        sents_padded.append(new_sentence)

    return sents_padded