def METHOD_NAME(cls, ability_id):
    assert isinstance(ability_id, int), f"Wrong type: {ability_id} is not int"
    if ability_id == 0:
        return False
    i = bisect_left(cls.ability_ids, ability_id)  # quick binary search
    return i != len(cls.ability_ids) and cls.ability_ids[i] == ability_id