public List<Path> search(ToShapeId startingShape, Selector targetSelector) {
        // Find all shapes that match the selector then work backwards from there.
        Set<Shape> candidates = targetSelector.select(model);

        if (candidates.isEmpty()) {
            LOGGER.info(() -> "No shapes matched the PathFinder selector of `" + targetSelector + "`");
            return ListUtils.of();
        }

        LOGGER.finest(() -> candidates.size() + " shapes matched the PathFinder selector of " + targetSelector);
        return searchFromShapeToSet(startingShape, candidates);
    }
Finds all of the possible paths from the starting shape to all shapes
connected to the starting shape that match the given selector.

@param startingShape Starting shape to find the paths from.
@param targetSelector Selector that matches shapes to find the path to.
@return Returns the list of matching paths.
smithy-model/src/main/java/software/amazon/smithy/model/selector/PathFinder.java