code: def _check_can_delete(
      entries: List["DataIndexEntry"],
      index: "BaseDataIndex",
      path: str,
      fs: "FileSystem",
  ):
      entry_paths = []
      for entry in entries:
          try:
              cache_fs, cache_path = index.storage_map.get_cache(entry)
          except ValueError:
              continue
  
          if cache_fs.exists(cache_path):
              continue
  
          entry_paths.append(fs.join(path, *(entry.key or ())))
  
      if not entry_paths:
          return
  
      raise DvcException(
          "Can't remove the following unsaved files without confirmation. "
          "Use `--force` to force.\n" + "\n".join(entry_paths)
      )
  
file_path: dvc/dvc/repo/checkout.py
imports: import os
  from typing import TYPE_CHECKING, Dict, List
  from dvc.exceptions import CheckoutError, CheckoutErrorSuggestGit, DvcException, NoOutputOrStageError
  from dvc.log import logger
  from dvc.ui import ui
  from dvc.utils import relpath
  from .None import locked
label_desc: Use image node_id 4 for calling a global function with example usage: _check_can_delete(entries, index, path, fs) without return types