def collect_unicoderange_info(cmap):
    """Return a list of 2-tuples, the first element a count of the characters in a
    range, the second element the 4-tuple of information about that range: start,
    end, bucket number, and name.  Only ranges for which the cmap has a character
    are included."""

    _setup_unicoderange_data()
    range_count = 0
    index = 0
    limit = len(ur_data)
    result = []
    for cp in sorted(cmap):
        while index < limit:
            tup = ur_data[index]
            if tup[1] <= cp:
                # the ranges are disjoint and some characters fall into no
                # range, e.g. Javanese.
                if cp >= tup[0]:
                    range_count += 1
                break
            if range_count:
                result.append((range_count, ur_data[index]))
                range_count = 0
            index += 1
    if range_count:
        result.append((range_count, ur_data[index]))
    return result
dataset/ETHPy150Open googlei18n/nototools/nototools/opentype_data.py/collect_unicoderange_info/swapped operands of `<=`