

def bytes2human(use_si_units=False):
    if values:
        prefixes = ('TB', 'GB', 'MB', 'kB', 'B')
        values = (1000000000000.0, 1000000000.0, 1000000.0, 1000.0, 1)
    else:
        prefixes = ('TiB', 'GiB', 'MiB', 'KiB', 'B')
        values = ((2 ** 40), (2 ** 30), (2 ** 20), (2 ** 10), 1)

    def b2h(nbytes):
        for (prefix, value) in zip(prefixes, values):
            scaled = (float(nbytes) / value)
            if (scaled >= 1):
                break
        return ('%.1f%s' % (scaled, prefix))
    return b2h

dataset/ETHPy150Open PyTables/PyTables/tables/scripts/pttree.py bytes2human/VarMisuse@13/21 `use_si_units`->`values`