class_docstr: Class that manages experiments in a DVC repo.
  
  Args:
      repo (dvc.repo.Repo): repo instance that these experiments belong to.
class_docstr_tok: ["Class","that","manages","experiments","in","a","DVC","repo",".","Args",":","repo","(","dvc.repo.Repo",")",":","repo","instance","that","these","experiments","belong","to","."]
docstr: Returns preferred name for the specified revision.
  
  Prefers tags, branches (heads), experiments in that order.
docstr_tok: ["Returns","preferred","name","for","the","specified","revision",".","Prefers","tags",",","branches","(","heads",")",",","experiments","in","that","order","."]
code: def get_exact_name(
      self, revs: Iterable[str]
  ) -> Dict[str, Optional[str]]:
      """Returns preferred name for the specified revision.
  
      Prefers tags, branches (heads), experiments in that order.
      """
      result: Dict[str, Optional[str]] = {}
      exclude = f"{EXEC_NAMESPACE}/*"
      ref_dict = self.scm.describe(
          revs, base=EXPS_NAMESPACE, exclude=exclude
      )
      for rev in revs:
          name: Optional[str] = None
          ref = ref_dict[rev]
          if ref:
              try:
                  name = ExpRefInfo.from_ref(ref).name
              except InvalidExpRefError:
                  pass
          if not name:
              if rev in self.stash_revs:
                  name = self.stash_revs[rev].name
              else:
                  failed_stash = self.celery_queue.failed_stash
                  if failed_stash and rev in failed_stash.stash_revs:
                      name = failed_stash.stash_revs[rev].name
          result[rev] = name
      return result
  
imports: import os
  import re
  from typing import TYPE_CHECKING, Dict, Iterable, List, Optional
  from funcy import chain, first
  from dvc.log import logger
  from dvc.ui import ui
  from dvc.utils import relpath
  from dvc.utils.objects import cached_property
  from .cache import ExpCache
  from .exceptions import BaselineMismatchError, ExperimentExistsError, InvalidExpRefError, MultipleBranchError
  from .refs import APPLY_STASH, CELERY_FAILED_STASH, CELERY_STASH, EXEC_APPLY, EXEC_NAMESPACE, EXPS_NAMESPACE, WORKSPACE_STASH, ExpRefInfo
  from .stash import ApplyStash
  from .utils import check_ref_format, exp_refs_by_rev, unlocked_repo
label_desc: Use image node_id 22 for calling the Experiments obj's underlying member method code with example usage: obj.get_exact_name(revs) and returns: result