code: def get_git_hash(terse: bool = True) -> str:
      """Get the PyKEEN git hash.
  
      :param terse: Should the hash be clipped to 8 characters?
      :return:
          The git hash, equals 'UNHASHED' if encountered CalledProcessError, signifying that the
          code is not installed in development mode.
      """
      rv = _run("git", "rev-parse", "HEAD")
      if rv is None:
          return "UNHASHED"
      if terse:
          return rv[:8]
      return rv
  
file_path: pykeen/src/pykeen/version.py
imports: import os
  import sys
  from functools import lru_cache
  from subprocess import CalledProcessError, check_output
  from typing import Optional, Tuple
label_desc: Use image node_id 1 for calling a global function with example usage: get_git_hash(terse) and returns: rv, str, rv