public static Schema fromNode(Node node) {
        if (node.isBooleanNode()) {
            BooleanNode booleanNode = node.expectBooleanNode();
            return new Schema.Builder().trivial(booleanNode.getValue()).build();
        }

        ObjectNode objectNode = node.expectObjectNode();
        Schema.Builder builder = builder();
        objectNode.getMembers().forEach((key, val) -> builder.applyNode(key.getValue(), val));

        return builder.build();
    }
Selects a nested schema using a variadic list of property names
to descend into.

<p>For example, this method can be used to get the items schema nested
inside of an array inside of an object:

<pre>{@code
Schema itemsSchema = schema.selectSchema("properties", "foo", "items").get();
}</pre>

@param segments The properties names to retrieve.
@return Returns the selected Schema.
smithy-jsonschema/src/main/java/software/amazon/smithy/jsonschema/Schema.java