def _pad_version(v_list: list, l: int) ->list:
    """ pad the list at the end with 0 value, but if last component is dev or post, the padding is before the last"""
    if l > 0:
        last = None
        if v_list[-1].startswith('dev') or v_list[-1].startswith('post'):
            last = v_list[-1]
            v_list = v_list[:-1]
        for idx in range(l):
            v_list.append(0)
        if last:
            v_list.append(last)
    return v_list
