private Optional<DoubleBinaryOperator> getDirectEvaluator() {
        if ( ! (functionExpression instanceof OperationNode node)) {
            return Optional.empty();
        }
        if ( ! (node.children().get(0) instanceof ReferenceNode lhs) || ! (node.children().get(1) instanceof ReferenceNode rhs)) {
            return Optional.empty();
        }
        if (! lhs.getName().equals(arguments.get(0)) || ! rhs.getName().equals(arguments.get(1))) {
            return Optional.empty();
        }
        if (node.operators().size() != 1) {
            return Optional.empty();
        }
        Operator operator = node.operators().get(0);
        return switch (operator) {
            case or -> asFunctionExpression((left, right) -> ((left != 0.0) || (right != 0.0)) ? 1.0 : 0.0);
            case and -> asFunctionExpression((left, right) -> ((left != 0.0) && (right != 0.0)) ? 1.0 : 0.0);
            case plus -> asFunctionExpression((left, right) -> left + right);
            case minus -> asFunctionExpression((left, right) -> left - right);
            case multiply -> asFunctionExpression((left, right) -> left * right);
            case divide -> asFunctionExpression((left, right) -> left / right);
            case modulo -> asFunctionExpression((left, right) -> left % right);
            case power -> asFunctionExpression(Math::pow);
            default -> Optional.empty();
        };
    }
Returns this as a double binary operator

@throws IllegalStateException if this has more than two arguments
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/LambdaFunctionNode.java