public void removeDuplicateOutputsTo(IntermediateOperation op) {
        int last, first = outputs.indexOf(op);
        while (first >= 0 && (last = outputs.lastIndexOf(op)) > first) {
            outputs.remove(last);
        }
    }
Removes outputs if they point to the same operation
model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/IntermediateOperation.java