public Set<UnionShape> getUnionShapesWithTrait(Class<? extends Trait> trait) {
        return new ShapeTypeFilteredSet<>(getShapesWithTrait(trait), UnionShape.class);
    }
Gets an immutable set of all unions in the Model that have a specific trait.

@param trait The exact trait class to look for on shapes.
@return Returns the set of {@code union}s that have a specific trait.
smithy-model/src/main/java/software/amazon/smithy/model/Model.java