def METHOD_NAME(resolver_kls):
    class replace_resolver(resolver_kls):
        overriding_resolver_kls = resolver_kls
        _vdb_restriction = _vdb_restrict
        def add_atoms(self, restricts, **kwds):
            restricts = [
                packages.KeyedAndRestriction(self._vdb_restriction, x, key=x.key)
                for x in restricts
            ]
            return self.overriding_resolver_kls.add_atoms(self, restricts, **kwds)
    return replace_resolver