def METHOD_NAME(validator_class):
    validate_properties = validator_class.VALIDATORS["properties"]
    def set_defaults(validator, properties, instance, schema):
        if jsonschema.Draft4Validator(schema).is_valid(instance):
            # only add default for the matching sub-schema (e.g. when using 'oneOf')
            for property, subschema in properties.items():
                if "default" in subschema:
                    instance.setdefault(property, subschema["default"])
        for error in validate_properties(validator, properties, instance, schema,):
            yield error
    return jsonschema.validators.extend(
        validator_class, {"properties" : set_defaults},
    )