code: def _digest(checksum):
      if isinstance(checksum, str):
          return checksum[0:8]
      return "{}..{}".format(checksum["old"][0:8], checksum["new"][0:8])
  
file_path: dvc/dvc/commands/diff.py
imports: import os
  from dvc.cli import completion, formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.log import logger
  from dvc.ui import ui
label_desc: Use image node_id 1 for calling a global function with example usage: _digest(checksum) and returns: str, checksum