public Optional<TraitDefinition> getTraitDefinition(ToShapeId traitId) {
        return getShape(traitId.toShapeId()).flatMap(shape -> shape.getTrait(TraitDefinition.class));
    }
Gets the trait definition of a specific trait shape ID.

@param traitId ID of the shape to get the trait definition of.
@return Returns the optionally found trait definition.
smithy-model/src/main/java/software/amazon/smithy/model/Model.java