code: def remove_exp_refs(scm: "Git", ref_infos: Iterable[ExpRefInfo]):
      exec_branch = scm.get_ref(EXEC_BRANCH, follow=False)
      exec_apply = scm.get_ref(EXEC_APPLY)
  
      for ref_info in ref_infos:
          ref = scm.get_ref(str(ref_info))
          if exec_branch and str(ref_info):
              scm.remove_ref(EXEC_BRANCH)
          if exec_apply and exec_apply == ref:
              scm.remove_ref(EXEC_APPLY)
          scm.remove_ref(str(ref_info))
  
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 13 for calling a global function with example usage: remove_exp_refs(scm, ref_infos) without return types