code: def configure_scope(self, callback=None):  # noqa
          
  
          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()
docs: Reconfigures the scope.