code: def tmpdir():
      
      target = None
      try:
          with _tmpdir_extant() as target:
              yield target
      finally:
          if target is not None:
              shutil.rmtree(target, ignore_errors=True)
docs: Create a tempdir context for the cwd and remove it after.