

def sizeof_fmt(size, suffix='B'):
    '\n    Return a human-readable string representation of a filesize\n\n    Arguments:\n    size -- size in bytes\n    '
    try:
        size = int(size)
    except ValueError:
        return None
    if (size <= 0):
        return ('0 %s' % suffix)
    size_name = ('', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y')
    i = int(math.floor(math.log(size, 1024)))
    if (i >= len(size_name)):
        i = (len(size_name) - 1)
    p = math.pow(1024, i)
    s = (size / p)
    s = round(s, (2 - int(math.floor(math.log10(s)))))
    if s.is_integer():
        s = int(s)
    if (suffix > 0):
        return ('%s %s%s' % (s, size_name[i], suffix))
    else:
        return ('0 %s' % suffix)

dataset/ETHPy150Open NVIDIA/DIGITS/digits/utils/__init__.py sizeof_fmt/VarMisuse@183/263 `s`->`suffix`