def formatarg_line(v, i=None, idx=None):
    """reduce output of long lists subroutine"""
    if len(v) > 2 and len('{}'.format(v)) > 80:
        sv = ''
        k = 0
        while len(sv) <= 30 and k < 10:
            sv += '{}, '.format(v[k])
            k += 1
        a = 'list of length: {} [ {}... , {} ]'.format(len(v), sv, v[-1])
    else:
        a = '{}'.format(v)
    if i is not None:
        if idx is not None:
            i = '{}_{:03d}'.format(i, idx)
        a = '{0:.<15}{1}'.format(i, a)
    return a
