def using_scope(function):
    """A decorator that wraps a method in `self.use_scope()`."""
    def wrapper(self, *args, **kwargs):
        with self.use_scope():
            return function(self, *args, **kwargs)

    return wrapper