public Set<Shape> walkShapes(Shape shape, Predicate<Relationship> predicate) {
        Set<Shape> result = new LinkedHashSet<>();
        Iterator<Shape> shapeIterator = iterateShapes(shape, predicate);
        while (shapeIterator.hasNext()) {
            result.add(shapeIterator.next());
        }

        return result;
    }
Walks connected shapes in the model (including the given shape),
and returns them in a set.

@param shape The shape to start the traversal from.
@param predicate Predicate used to prevent traversing relationships.
@return Returns a set of connected shapes.
smithy-model/src/main/java/software/amazon/smithy/model/neighbor/Walker.java