class_docstr: Standalone/tempdir exp queue implementation.
class_docstr_tok: ["Standalone\/tempdir","exp","queue","implementation","."]
code: def collect_active_data(
      self,
      baseline_revs: Optional[Collection[str]],
      fetch_refs: bool = False,
      **kwargs,
  ) -> Dict[str, List["ExpRange"]]:
      from dvc.repo import Repo
      from dvc.repo.experiments.collect import collect_exec_branch
      from dvc.repo.experiments.serialize import (
          ExpExecutor,
          ExpRange,
          LocalExpExecutor,
      )
  
      result: Dict[str, List[ExpRange]] = defaultdict(list)
      for entry in self.iter_active():
          if baseline_revs and entry.baseline_rev not in baseline_revs:
              continue
          if fetch_refs:
              fetch_running_exp_from_temp_dir(
                  self, entry.stash_rev, fetch_refs
              )
          proc_info = self.proc.get(entry.stash_rev)
          infofile = self.get_infofile_path(entry.stash_rev)
          executor_info = ExecutorInfo.load_json(infofile)
          if proc_info:
              local_exec: Optional[LocalExpExecutor] = LocalExpExecutor(
                  root=executor_info.root_dir,
                  log=proc_info.stdout,
                  pid=proc_info.pid,
              )
          else:
              local_exec = None
          dvc_root = os.path.join(
              executor_info.root_dir, executor_info.dvc_dir
          )
          with Repo(dvc_root) as repo:
              exps = list(
                  collect_exec_branch(
                      repo, executor_info.baseline_rev, **kwargs
                  )
              )
          exps[0].rev = entry.stash_rev
          exps[0].name = entry.name
          result[entry.baseline_rev].append(
              ExpRange(
                  exps,
                  executor=ExpExecutor(
                      "running",
                      name=executor_info.location,
                      local=local_exec,
                  ),
                  name=entry.name,
              )
          )
      return result
  
imports: import os
  from collections import defaultdict
  from typing import TYPE_CHECKING, Collection, Dict, Generator, List, Optional
  from funcy import first
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.repo.experiments.exceptions import ExpQueueEmptyError
  from dvc.repo.experiments.executor.base import ExecutorInfo, TaskStatus
  from dvc.repo.experiments.executor.local import TempDirExecutor
  from dvc.repo.experiments.utils import EXEC_PID_DIR, EXEC_TMP_DIR
  from dvc.utils.objects import cached_property
  from .base import BaseStashQueue, QueueEntry, QueueGetResult
  from .utils import fetch_running_exp_from_temp_dir
  from .workspace import WorkspaceQueue
label_desc: Use image node_id 8 for calling the TempDirQueue obj's underlying member method code with example usage: obj.collect_active_data(baseline_revs, fetch_refs) and returns: result