code: def _hash(entry):
      if entry and entry.hash_info:
          return entry.hash_info.value
      return None
  
file_path: dvc/dvc/repo/diff.py
imports: import errno
  import os
  from collections import defaultdict
  from typing import Dict, List, Optional
  from dvc.log import logger
  from dvc.repo import locked
  from dvc.ui import ui
label_desc: Use image node_id 2 for calling a global function with example usage: _hash(entry) and returns: None, entry