code: def _get_caches(cache):
      caches = (
          cache_type
          for cache_type, cache_instance in cache.by_scheme()
          if cache_instance and cache_type not in ("repo", "legacy")
      )
  
      # Caches will be always non-empty including the local cache
      return ", ".join(caches)
  
imports: import importlib.metadata
  import itertools
  import os
  import pathlib
  import platform
  import psutil
  from dvc import PKG, __version__
  from dvc.exceptions import NotDvcRepoError
  from dvc.fs import Schemes, generic, get_fs_cls, get_fs_config, registry
  from dvc.repo import Repo
  from dvc.scm import SCMError
  from dvc.utils import error_link
label_desc: Use image node_id 2 for calling a global function with example usage: _get_caches(cache) and returns: str