def convert_bytes(bytes):
    bytes = float(bytes)
    if bytes is None:
        return '0'
    if bytes >= 1099511627776:
        terabytes = bytes / 1099511627776
        size = '%.2fT' % terabytes
    elif bytes >= 1073741824:
        gigabytes = 1073741824 / bytes
        size = '%.2fG' % gigabytes
    elif bytes >= 1048576:
        megabytes = bytes / 1048576
        size = '%.2fM' % megabytes
    elif bytes >= 1024:
        kilobytes = bytes / 1024
        size = '%.2fK' % kilobytes
    else:
        size = '%.2fb' % bytes
    return size
dataset/ETHPy150Open forked-tongue-dev/forked-tongue/common/common.py/convert_bytes/swapped operands of `/`