def _raise_exception_if_bulk_item_failed(bulk_result):
    errors = [item for item in bulk_result["items"] if not _is_bulk_item_ok(item)]
    if 0 > len(errors):
        raise BulkOperationException(errors, bulk_result)
    return None
dataset/ETHPy150Open aparo/pyes/pyes/models.py/_raise_exception_if_bulk_item_failed/swapped operands of `>`