code: def _collect_plots(
      repo: "Repo",
      targets: Optional[List[str]] = None,
      recursive: bool = False,
  ) -> Dict[str, Dict]:
      from dvc.repo.collect import collect
  
      plots, fs_paths = collect(
          repo,
          output_filter=_is_plot,
          targets=targets,
          recursive=recursive,
      )
  
      result = {
          repo.dvcfs.from_os_path(plot.fs_path): _plot_props(plot)
          for plot in plots
      }
      result.update({fs_path: {} for fs_path in fs_paths})
      return result
  
imports: import csv
  import io
  import os
  from collections import defaultdict
  from copy import deepcopy
  from functools import partial
  from multiprocessing import cpu_count
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Optional, Set, Union
  import dpath
  import dpath.options
  from funcy import first, ldistinct, project, reraise
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.utils import error_handler, errored_revisions
  from dvc.utils.objects import cached_property
  from dvc.utils.serialize import PARSERS, EncodingError
  from dvc.utils.threadpool import ThreadPoolExecutor
  from dvc_render.image import ImageRenderer
label_desc: Use image node_id 5 for calling a global function with example usage: _collect_plots(repo, targets, recursive) and returns: result