code: def iter_remote_refs(
      scm: "Git", url: str, base: Optional[str] = None, **kwargs
  ):
      from scmrepo.exceptions import AuthError, InvalidRemote
  
      from dvc.scm import GitAuthError, InvalidRemoteSCMRepo
  
      try:
          yield from scm.iter_remote_refs(url, base=base, **kwargs)
      except InvalidRemote as exc:
          raise InvalidRemoteSCMRepo(str(exc))  # noqa: B904
      except AuthError as exc:
          raise GitAuthError(str(exc))
  
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 7 for calling a global function with example usage: iter_remote_refs(scm, url, base) without return types