code: def _meta_checksum(fs: "FileSystem", meta: "Meta") -> Any:
      if not meta or meta.isdir:
          return meta
      assert fs.PARAM_CHECKSUM
      return getattr(meta, fs.PARAM_CHECKSUM)
  
file_path: dvc/dvc/repo/worktree.py
imports: from functools import partial
  from typing import TYPE_CHECKING, Any, Dict, Iterable, Optional, Tuple, Union
  from funcy import first
  from dvc.log import logger
  from dvc.stage.exceptions import StageUpdateError
label_desc: Use image node_id 1 for calling a global function with example usage: _meta_checksum(fs, meta) and returns: getattr, meta