def assemble_warnings(w):
    """pretty-format all warnings for logs"""
    wlog = []
    for wi in w:
        wlog.append('{}'.format(wi.category.__name__))
        wlog.append(' in {} line {}:'.format(wi.category.__module__, wi.lineno)
            )
        words = str(wi.message).split(' ')
        wline = '  '
        for ii in range(len(words)):
            wline += ' ' + words[ii]
            if ii == len(words) - 1:
                wlog.append(wline)
            elif len(wline + words[ii + 1]) + 1 >= 100:
                wlog.append(wline)
                wline = '  '
    return wlog
