Reconfigures the scope.

def configure_scope(self, callback=None):  # noqa
        """Reconfigures the scope."""

        client, scope = self._stack[-1]
        if callback is not None:
            if client is not None:
                callback(scope)

            return None

        @contextmanager
        def inner():
            if client is not None:
                yield scope
            else:
                yield Scope()

        return inner()