code: def collect_active(
      repo: "Repo",
      baseline_revs: Collection[str],
      **kwargs,
  ) -> Dict[str, List["ExpRange"]]:
      """Collect active (running) experiments derived from the specified revisions.
  
      Args:
          repo: Repo.
          baseline_revs: Resolved baseline Git SHAs.
  
      Returns:
          Dict mapping baseline revision to list of active experiments.
      """
      if not baseline_revs:
          return {}
      result: Dict[str, List["ExpRange"]] = {}
      exps = repo.experiments
      for queue in (
          exps.workspace_queue,
          exps.tempdir_queue,
          exps.celery_queue,
      ):
          for baseline, active_exps in queue.collect_active_data(
              baseline_revs, **kwargs
          ).items():
              if baseline in result:
                  result[baseline].extend(active_exps)
              else:
                  result[baseline] = list(active_exps)
      return result
  
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 6 for calling a global function with example usage: collect_active(repo, baseline_revs) and returns: result, dict