@Override
        public T createTrait(ShapeId id, Node value) {
            if (value.isObjectNode()) {
                return traitFactory.apply(value.expectObjectNode());
            }

            throw new ExpectationNotMetException(String.format(
                    "Annotation traits  must be an object or omitted in the IDL, but found %s",
                    value.getType()), value);
        }
@param id ID of the trait being created.
@param traitFactory Factory function used to create the trait.
smithy-model/src/main/java/software/amazon/smithy/model/traits/AnnotationTrait.java