I think there should be a dedicated function for that, something like `annotations.get(AnnotationRetentionAttr)`