def padding(seq: list, max_length: int, pad_tok=None):
    """
    :param seq: list to pad
    :param max_length: length of padded list
    :param pad_tok: token used to pad
    :return: padded list
    """
    return (seq + [pad_tok] * max_length)[:max_length]