private Set<ShapeId> getTaggedShapesToInclude(Set<String> tags, Model model) {
        return model.shapes()
                .filter(FunctionalUtils.not(Prelude::isPreludeShape))
                .filter(shape -> isTagged(tags, shape))
                .map(Shape::getId)
                .collect(Collectors.toSet());
    }
Gets the set of tags that are retained in the model.

@return Returns the tags to retain.
smithy-build/src/main/java/software/amazon/smithy/build/transforms/FlattenNamespaces.java