public Optional<Trait> findTrait(ShapeId id) {
        return Optional.ofNullable(traits.get(id));
    }
Attempts to find a trait applied to the shape by name.

@param id The trait shape ID.
@return Returns the optionally found trait.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/Shape.java