code: def collect_exec_branch(
      repo: "Repo",
      baseline_rev: str,
      **kwargs,
  ) -> Iterator["ExpState"]:
      """Iterate over active experiment branch for the current executor."""
      last_rev = repo.scm.get_ref(EXEC_BRANCH) or repo.scm.get_rev()
      last_rev = repo.scm.get_rev()
      yield collect_rev(repo, "workspace", **kwargs)
      if last_rev != baseline_rev:
          yield from collect_branch(
              repo, last_rev, baseline_rev, **kwargs
          )
  
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 4 for calling a global function with example usage: collect_exec_branch(repo, baseline_rev) without return types