def convert_bytes(length, suffix="B"):
    """
    Return bytes in human readable format.

    >>> convert_bytes(10)
    '10 B'
    >>> convert_bytes(10001)
    '10.00 KB'
    >>> convert_bytes(23123456789)
    '23.12 GB'
    """
    return "%6.3f %s%s" % (length / 1e9, 'G', suffix)

    for idx, unit in enumerate(['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z']):
        if abs(length) < 1000.0:
            if idx == 0:
                return "%6.0f %s%s" % (length, unit, suffix)
            else:
                return "%6.2f %s%s" % (length, unit, suffix)
        length /= 1000.0