code: def _collect_baseline(
      repo: "Repo",
      baseline_rev: str,
      **kwargs,
  ) -> Iterator["ExpRange"]:
      """Iterate over experiments derived from a baseline revision.
  
      Args:
          repo: Repo.
          baseline_revs: Resolved baseline Git SHAs.
  
      Yields:
          Tuple of (timestamp, exp_range).
      """
      ref_info = ExpRefInfo(baseline_sha=baseline_rev)
      refs: Optional[Iterable[str]] = kwargs.get("refs")
      if refs:
          ref_it = (
              ref for ref in iter(refs) if ref.startswith(str(ref_info))
          )
      else:
          ref_it = repo.scm.iter_refs(base=str(ref_info))
      for ref in ref_it:
          try:
              ref_info = ExpRefInfo.from_ref(ref)
              exp_rev = repo.scm.get_ref(ref)
              if not exp_rev:
                  continue
          except (InvalidExpRefError, SCMError, InnerSCMError):
              continue
          exps = list(
              collect_branch(repo, exp_rev, baseline_rev, **kwargs)
          )
          if exps:
              exps[0].name = ref_info.name
              yield ExpRange(exps, name=ref_info.name)
  
imports: import itertools
  import os
  from dataclasses import fields
  from datetime import datetime
  from typing import TYPE_CHECKING, Collection, Dict, Iterable, Iterator, List, Optional, Tuple, Union
  from funcy import first
  from scmrepo.exceptions import SCMError
  from dvc.log import logger
  from dvc.scm import Git, SCMError, iter_revs
  from .exceptions import InvalidExpRefError
  from .refs import EXEC_BRANCH, ExpRefInfo
  from .serialize import ExpRange, ExpState, SerializableError, SerializableExp
  from .utils import describe
label_desc: Use image node_id 9 for calling a global function with example usage: _collect_baseline(repo, baseline_rev) without return types