since this function would probably be used exclusively with RESOURCE_MODIFIED you could set it as the default:

    kw.setdefault('code', msg.RESOURCE_MODIFIED)