public Expression createFunction() {
        return EndpointRuleSet.createFunctionFactory()
                .apply(this)
                .orElseThrow(() -> new RuleError(new SourceException(
                        String.format("`%s` is not a valid function", name),
                        name)));
    }
Returns an expression representing this function.

@return this function as an expression.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/syntax/expressions/functions/FunctionNode.java