class_docstr: Temp directory experiment executor.
class_docstr_tok: ["Temp","directory","experiment","executor","."]
code: def from_stash_entry(
      cls,
      repo: "Repo",
      entry: "ExpStashEntry",
      wdir: Optional[str] = None,
      **kwargs,
  ):
      assert repo.tmp_dir
      parent_dir: str = wdir or os.path.join(repo.tmp_dir, EXEC_TMP_DIR)
      os.makedirs(parent_dir, exist_ok=True)
      tmp_dir = mkdtemp(dir=parent_dir)
      try:
          executor = cls._from_stash_entry(
              repo, entry, tmp_dir, **kwargs
          )
          logger.debug("Init temp dir executor in '%s'", tmp_dir)
          return executor
      except Exception:
          remove(tmp_dir)
          raise
  
imports: import os
  from contextlib import ExitStack
  from tempfile import mkdtemp
  from typing import TYPE_CHECKING, Optional, Union
  from configobj import ConfigObj
  from funcy import retry
  from shortuuid import uuid
  from dvc.lock import LockError
  from dvc.log import logger
  from dvc.repo.experiments.refs import EXEC_BASELINE, EXEC_BRANCH, EXEC_HEAD, EXEC_MERGE, EXEC_NAMESPACE, TEMP_NAMESPACE
  from dvc.repo.experiments.utils import EXEC_TMP_DIR, get_exp_rwlock
  from dvc.scm import SCM, Git
  from dvc.utils.fs import remove
  from dvc.utils.objects import cached_property
  from .base import BaseExecutor, TaskStatus
label_desc: Use image node_id 5 for calling the TempDirExecutor obj's underlying member method code with example usage: obj.from_stash_entry(cls, repo, entry, wdir) and returns: executor