code: def temporary(self, path):
      
      if path is None:
        raise ValueError('Can only temporarily establish a build root given a path.')
      prior = self._root_dir
      self._root_dir = path
      try:
        yield
      finally:
        self._root_dir = prior
docs: Establishes a temporary build root, restoring the prior build root on exit.