def bytes_formatter(b):
    """ Formatter that formats bytes into kb/mb/gb etc... """
    for u in ' KMGTPEZ':
        if abs(b) < 1024.0:
            return "%3.1f%s" % (b, u)
        b /= 1024.0
    return "%.1f%s" % (b, 'Y')