code: def _cmp(a: Version, b: Version) -> int:
      """Implementation of ``cmp`` for Python 3"""
      return (a > b) - (a < b)
  
file_path: nibabel/nibabel/pkg_info.py
imports: from __future__ import annotations
  import sys
  from contextlib import suppress
  from subprocess import run
  from packaging.version import Version
label_desc: Use image node_id 1 for calling a global function with example usage: _cmp(a, b) and returns: unknown