@Override
    public Response push(Context context, Shape shape, Receiver next) {
        Walker walker = new Walker(context.neighborIndex.getProvider());
        Iterator<Shape> shapeIterator = walker.iterateShapes(shape, ONLY_DIRECTED);

        while (shapeIterator.hasNext()) {
            Shape nextShape = shapeIterator.next();
            // Don't include the shape being visited.
            if (!nextShape.equals(shape)) {
                if (next.apply(context, nextShape) == Response.STOP) {
                    // Stop sending recursive neighbors when told to stop and propagate.
                    return Response.STOP;
                }
            }
        }

        return Response.CONTINUE;
    }
Find all shapes recursively connected to a shape using directed edges.
smithy-model/src/main/java/software/amazon/smithy/model/selector/RecursiveNeighborSelector.java