private static void loadMetadataSuppressions(
            Model model,
            List<Suppression> suppressions,
            List<ValidationEvent> events
    ) {
        model.getMetadataProperty(SUPPRESSIONS).ifPresent(value -> {
            try {
                List<ObjectNode> values = value.expectArrayNode().getElementsAs(ObjectNode.class);
                for (ObjectNode rule : values) {
                    try {
                        suppressions.add(Suppression.fromMetadata(rule));
                    } catch (SourceException e) {
                        events.add(ValidationEvent.fromSourceException(e));
                    }
                }
            } catch (SourceException e) {
                events.add(ValidationEvent.fromSourceException(e));
            }
        });
    }
Creates a ValidationEventDecorator for the given Model.

<p>Validators, suppressions, and severity overrides found in the model are used each time
{@link ValidationEventDecorator#decorate(ValidationEvent)} is called. The
{@link ValidationEventDecorator#canDecorate(ValidationEvent)} always returns true.

@param model Model to load validation events from.
@return Returns a decorator that can be used to modify the severity and suppression reason of each given event.
smithy-model/src/main/java/software/amazon/smithy/model/validation/suppressions/ModelBasedEventDecorator.java