code: def collect(
      repo: "Repo",
      deps: bool = False,
      targets: Optional[Iterable[str]] = None,
      output_filter: Optional[FilterFn] = None,
      recursive: bool = False,
      duplicates: bool = False,
  ) -> Tuple[Outputs, StrPaths]:
      assert targets or output_filter
  
      outs: Outputs = _collect_outs(
          repo, output_filter=output_filter, deps=deps
      )
  
      if not targets:
          fs_paths: StrPaths = []
          return outs, fs_paths
  
      target_paths = _collect_paths(repo, targets, recursive=recursive)
  
      return _filter_outs(outs, target_paths, duplicates=duplicates)
  
imports: from typing import TYPE_CHECKING, Callable, Iterable, List, Optional, Tuple
  from dvc.log import logger
label_desc: Use image node_id 4 for calling a global function with example usage: collect(repo, deps, targets, output_filter, recursive, duplicates) and returns: _filter_outs, outs,  fs_paths