private boolean shouldKeepDimensions() {
        Optional<Value> keepDims = attributeMap.get("keepdims");
        return keepDims.isEmpty() || keepDims.get().asBoolean();  // default is 1
    }
ONNX Reduce[Sum/Mean/etc] operation
model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/Reduce.java