def METHOD_NAME(self, value, u=0):
    fractal = 0
    if value >= 1024:
        fmt = '%(size)u.%(frac)d %(unit)s'
        while value >= 1024 and u < len(SIZE_UNITS):
            value, mod = divmod(value, 1024)
            fractal = mod * 10 // 1024
            u += 1
    else:
        fmt = '%(size)u %(unit)s'
    return fmt % {'size': value,
     'frac': fractal,
     'unit': SIZE_UNITS[u]}