private Shape removeTraitsFromShape(Shape shape, Set<ShapeId> removedTraits) {
        AbstractShapeBuilder<?, ?> builder = Shape.shapeToBuilder(shape);
        for (ShapeId id : removedTraits) {
            builder.removeTrait(id);
        }

        return builder.build();
    }
Removes traits from shapes when trait definitions are removed.
smithy-model/src/main/java/software/amazon/smithy/model/transform/plugins/RemoveTraits.java