# After the early stop, it is necessary to process some of the returned lists to ensure that their length is consistent with the epoch
def list_length(l, epoch):
    if len(l) != epoch:
        l = l + [l[-1]] * (epoch - len(l))
    return l