def output_table(results):
    head = ('Test', 'Encoding', 'Decoding', 'Round-trip')
    rows = ([head] + [(label, format_leaks(result.encoding), format_leaks(result.decoding), format_leaks(result.roundtrip)) for (label, result) in results.items()])
    cols = zip(*rows)
    col_widths = [max((len(row) for row in col)) for col in cols]
    sep = ''.join(('+-', '-+-'.join((('-' * width) for width in col_widths)), '-+'))
    print(sep)
    print(''.join(('| ', ' | '.join(('{value:<{width}}'.format(value=value, width=width) for (value, width) in zip(head, col_widths))), ' |')))
    print(sep)
    for row in rows[1:]:
        print(''.join(('| ', ' | '.join(('{value:<{width}}'.format(value=value, width=width) for (value, width) in zip(row, col_widths))), ' |')))
    print(sep)
    print()
    print('There *will* be false positives in the table above. Ignore leaks involving a\ntiny number of objects (e.g. 1) or a small number of bytes (e.g. < 8Kb) as such\nallocations are quite normal.\n\nIn the case of a ref-leak of an object that can reference others (lists, sets,\ndicts, or anything with a __dict__), expect to see 100s or 1000s of "objs"\nleaked. In the case of a ref-leak of a simple object (int, str, bytes, etc.),\nexpect to see a few hundred Kb allocated.\n\nIf leaks occur across the board, it\'s likely to be in something universal like\ndump/load. If it\'s restricted to a type, check the encoding and decoding\nmethods for that type.\n')
def output_table(results):
    head = ('Test', 'Encoding', 'Decoding', 'Round-trip')
    rows = ([head] + [(label, format_leaks(result.encoding), format_leaks(result.decoding), format_leaks(result.roundtrip)) for (label, result) in results.items()])
    cols = zip(*rows)
    col_widths = [max((len(row) for row in col)) for col in cols]
    sep = .join(('+-', '-+-'.join((('-' * width) for width in col_widths)), '-+'))
    print(sep)
    print(.join(('| ', ' | '.join(('{value:<{width}}'.format(value=value, width=width) for (value, width) in zip(head, col_widths))), ' |')))
    print(sep)
    for row in rows[1:]:
        print(.join(('| ', ' | '.join(('{value:<{width}}'.format(value=value, width=width) for (value, width) in zip(row, col_widths))), ' |')))
    print(sep)
    print()
    print('There *will* be false positives in the table above. Ignore leaks involving a\ntiny number of objects (e.g. 1) or a small number of bytes (e.g. < 8Kb) as such\nallocations are quite normal.\n\nIn the case of a ref-leak of an object that can reference others (lists, sets,\ndicts, or anything with a __dict__), expect to see 100s or 1000s of "objs"\nleaked. In the case of a ref-leak of a simple object (int, str, bytes, etc.),\nexpect to see a few hundred Kb allocated.\n\nIf leaks occur across the board, it\'s likely to be in something universal like\ndump/load. If it\'s restricted to a type, check the encoding and decoding\nmethods for that type.\n')