private IntermediateOperation copyTree() {
        List<IntermediateOperation> in = new ArrayList<>();
        if (constantValue != null) {
            IntermediateOperation constant = new Constant(modelName, name, type);
            constant.setConstantValueFunction(t -> new TensorValue(constantValue.asTensor().withType(t.type())));
            return constant;
        }
        inputs.forEach(i -> in.add(i.copyTree()));
        IntermediateOperation copy = withInputs(in);
        if (constantValueFunction != null) {
            copy.constantValueFunction = constantValueFunction;
        }
        return copy;
    }
Recursively evaluates this operation's constant value to avoid doing it run-time.
model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/IntermediateOperation.java