code: def metrics_from_target(
      repo: "Repo", targets: List[str]
  ) -> Iterator["Output"]:
      stages = chain.from_iterable(
          repo.stage.collect(target) for target in targets
      )
      for stage in stages:
          yield from stage.metrics
  
imports: import os
  from itertools import chain
  from typing import TYPE_CHECKING, Any, Dict, Iterable, Iterator, List, Optional, Tuple, TypedDict, Union
  from funcy import ldistinct
  from scmrepo.exceptions import SCMError
  from dvc.log import logger
  from dvc.scm import NoSCMError
  from dvc.utils import as_posix, expand_paths
  from dvc.utils.collections import ensure_list
  from dvc.utils.serialize import load_path
label_desc: Use image node_id 5 for calling a global function with example usage: metrics_from_target(repo, targets) without return types