human
I wrote the below code

    _l_header = len(header[0])
    _space = '        '
    rtlst.sort(key=(lambda x: x[sortBy]))
    rtlst = (header + rtlst)
    colwidth = [max([len(y) for y in x]) for x in apply(zip, rtlst)]
    width = get_terminal_width()
    if width:
        if (sum(colwidth) > width):
            _med = ((width // _l_header) - (1 if WINDOWS else 0))
            for i in range(1, len(colwidth)):
                if ((sum(colwidth) + 6) <= width):
                    break
                _max = max(colwidth)
                colwidth = [(_med if (x == _max) else x) for x in colwidth]
            def _crop(x, width):
                _r = x[:width]
                if (_r != x):
                    _r = x[:(width - 3)]
                    return (_r + '...')
                return _r
            rtlst = [tuple([_crop(rtlst[j][i], colwidth[i]) for i in range(0, len(rtlst[j]))]) for j in range(0, len(rtlst))]
            colwidth = [max([len(y) for y in x]) for x in apply(zip, rtlst)]
    fmt = _space.join([('%%-%ds' % x) for x in colwidth])
    rt = '\n'.join([(fmt % x) for x in rtlst])
    return rt

What's a good function header?
assistant
#Here's a good function header.

def pretty_routes(rtlst, header, sortBy=0):