code: def resolve_name(
      scm: "Git",
      exp_names: Union[Iterable[str], str],
      git_remote: Optional[str] = None,
  ) -> Dict[str, Optional[ExpRefInfo]]:
      """find the ref_info of specified names."""
      if isinstance(exp_names, str):
          exp_names = [exp_names]
  
      result = {}
      unresolved = set()
      for exp_name in exp_names:
          if exp_name.startswith("refs/"):
              result[exp_name] = ExpRefInfo.from_ref(exp_name)
          else:
              unresolved.add(exp_name)
  
      unresolved_result = exp_refs_by_names(scm, unresolved, git_remote)
      cur_rev = scm.get_rev()
      for name in unresolved:
          ref_info_list = unresolved_result[name]
          if not ref_info_list:
              result[name] = None
          elif len(ref_info_list) == 1:
              result[name] = ref_info_list[0]
          else:
              for ref_info in ref_info_list:
                  if ref_info.baseline_sha == cur_rev:
                      result[name] = ref_info
                      break
              else:
                  raise AmbiguousExpRefInfo(name, ref_info_list)
      return result
  
imports: import os
  import random
  import sys
  from collections import defaultdict
  from functools import wraps
  from typing import TYPE_CHECKING, Callable, Dict, Generator, Iterable, List, Mapping, Optional, Set, Tuple, Union
  from dvc.exceptions import InvalidArgumentError
  from dvc.repo.experiments.exceptions import AmbiguousExpRefInfo
  from dvc.rwlock import rwlock
  from dvc.scm import Git
  from .refs import EXEC_APPLY, EXEC_BASELINE, EXEC_BRANCH, EXPS_NAMESPACE, ITER_SKIP_NAMESPACES, STASHES, ExpRefInfo
label_desc: Use image node_id 15 for calling a global function with example usage: resolve_name(scm, exp_names, git_remote) and returns: result