<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mutator(*cache_names):
 """Decorator for ``Document`` methods that change the document. This decorator ensures that the object's caches are kept in sync when changes are made. """

    def deco(fn):
        @wraps(fn)
        def _fn(self, *args, **kwargs):
            try:
                return fn(self, *args, **kwargs)
            finally:
                for cache_name in cache_names:
                    setattr(self, cache_name, None)

        return _fn

    return deco