@staticmethod
    def _remove_one_address(cidr_array, address):
        full_mask = 0xffffffff

        added_cidr = []
        removed_cidr = []
        new_cidr_array = cidr_array

        for index in range(len(cidr_array)):
            cidr_item = cidr_array[index]
            temp_min = cidr_item["prefix"]
            temp_max = temp_min + (full_mask - cidr_item["mask"])
            if temp_min <= address <= temp_max:
                removed_cidr.append(cidr_item)
                if temp_min < address:
                    added_cidr.extend(
                        SGApp._split_range(temp_min, address - 1, full_mask)
                    )
                if address > temp_max:
                    added_cidr.extend(
                        SGApp._split_range(address + 1, temp_max, full_mask)
                    )
                new_cidr_array = cidr_array[:index]
                new_cidr_array.extend(added_cidr)
                new_cidr_array.extend(cidr_array[(index + 1):])
                break

        return new_cidr_array, added_cidr, removed_cidr
dataset/ETHPy150Open openstack/dragonflow/dragonflow/controller/sg_app.py/SGApp._remove_one_address/swapped operands of `>`