private void pushNeighbors(List<Relationship> relationships) {
            for (Relationship rel : relationships) {
                // Only look at valid relationships that pass the predicate.
                if (rel.getNeighborShape().isPresent() && predicate.test(rel)) {
                    stack.push(rel);
                }
            }
        }
Lazily iterates over all of the unique shapes in the closure of
the given shape, including the given shape.

@param shape Shape to find the closure of.
@param predicate Predicate used to short-circuit relationship branches.
@return Returns an iterator of shapes connected to {@code shape}.
smithy-model/src/main/java/software/amazon/smithy/model/neighbor/Walker.java