code: def temporary_dir():
      
      d = tempfile.mkdtemp()
      try:
          with cd(d):
              yield d
      finally:
          if os.path.exists(d):
              shutil.rmtree(d)
docs: Context manager that creates a temporary directory and chdirs to it.
  
      When the context manager exits it returns to the previous cwd
      and deletes the temporary directory.