public static Condition fromNode(Node node) {
        Builder builder = new Builder();
        ObjectNode objectNode = node.expectObjectNode("condition must be an object node");

        builder.fn(FunctionNode.fromNode(objectNode).createFunction());
        // This needs to go directly through the node to maintain source locations.
        if (objectNode.containsMember(ASSIGN)) {
            builder.result(Identifier.of(objectNode.expectStringMember(ASSIGN)));
        }

        return builder.build();
    }
Constructs a condition from the given node.

@param node the node.
@return the condition instance.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/syntax/rule/Condition.java