code: def exp_refs_by_baseline(
      scm: "Git",
      revs: Optional[Set[str]] = None,
      url: Optional[str] = None,
  ) -> Mapping[str, List[ExpRefInfo]]:
      """Iterate over all experiment refs with the specified baseline."""
      all_exp_refs = exp_refs(scm, url)
      result = defaultdict(list)
      for ref in all_exp_refs:
          if revs is None or ref.baseline_sha in revs:
              result[ref.baseline_sha].append(ref)
      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 6 for calling a global function with example usage: exp_refs_by_baseline(scm, revs, url) and returns: result