def METHOD_NAME(cls, node_attr, layer, value):
    if get_attr_in_layer(node_attr, layer=layer) == value:
        # Already ok. This can happen if you have multiple renderlayers
        # validated and there are no frame range overrides. The first
        # layer's repair would have fixed the global value already
        return
    overrides = list(get_attr_overrides(node_attr, layer=layer))
    if overrides:
        # We set the last absolute override if it is an absolute override
        # otherwise we'll add an Absolute override
        last_override = overrides[-1][1]
        if not isinstance(last_override, AbsOverride):
            collection = last_override.parent()
            node, attr = node_attr.split(".", 1)
            last_override = collection.createAbsoluteOverride(node, attr)
        cls.log.debug("Setting {attr} absolute override in "
                      "layer '{layer}': {value}".format(layer=layer,
                                                        attr=node_attr,
                                                        value=value))
        cmds.setAttr(last_override.name() + ".attrValue", value)
    else:
        # Set the attribute directly
        # (Note that this will set the global attribute)
        cls.log.debug("Setting global {attr}: {value}".format(
            attr=node_attr,
            value=value
        ))
        cmds.setAttr(node_attr, value)