docs: def cd(directory):
      """Change the current working directory, temporarily.
  
      Use as a context manager: with cd(d): ...
      """
      old_dir = os.getcwd()
      try:
          os.chdir(directory)
          yield
      finally:
          os.chdir(old_dir)