code: def _make_index_onerror(onerror, rev):
      def _onerror(entry, exc):
          if onerror:
              return onerror(rev, entry, exc)
  
      return _onerror
  
file_path: dvc/dvc/repo/fetch.py
imports: from typing import TYPE_CHECKING, List, Tuple
  from dvc.exceptions import DownloadError
  from dvc.log import logger
  from dvc.ui import ui
  from dvc_data.index import DataIndex, FileStorage
  from .None import locked
label_desc: Use image node_id 1 for calling a global function with example usage: _make_index_onerror(onerror, rev) and returns: _onerror, onerror