code: def _get_git_revision():
      try:
          revision = subprocess.check_output(
              REVISION_CMD.split()
          ).strip()
      except (subprocess.CalledProcessError, OSError):
          print("Failed to execute git to get revision")
          return None
      return revision.decode("utf-8")
  
file_path: imbalanced-learn/doc/sphinxext/github_link.py
imports: import inspect
  import os
  import subprocess
  import sys
  from functools import partial
  from operator import attrgetter
label_desc: Use image node_id 1 for calling a global function with example usage: _get_git_revision() and returns: revision, None