def sizeof_fmt(num, unit='', suffix='B', target_unit=None):
    """ Format the number to get the human readable version.

    :param num: Number
    :param unit: Current unit of the number
    :param suffix: Suffix of the result
    :param target_unit: Desirable unit for result
    :return: String with human readable version of the number
    """

    for unit in UNITS[UNITS.index(unit.upper()):]:
        if target_unit is None and abs(num) < 1024. or target_unit <= unit:
            return "%3.1f%s%s" % (num, unit, suffix)
        num /= 1024.
    return "%.1f%s%s" % (num, 'Y', suffix)
dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry/lib/utils/sizeof_format.py/sizeof_fmt/operator `==` -> `<=`