code: def get_git_revision_hash(short=True):
      # get commit id, with +mods if local tree is not clean
      if not os.path.isdir(".git"):
          # print('Version : not in git repository : can\'t get sha')
          return None
      import subprocess
  
      aubio_dir = os.path.dirname(os.path.abspath(__file__))
      if not os.path.exists(aubio_dir):
          raise SystemError("git / root folder not found")
      gitcmd = ["git", "-C", aubio_dir, "rev-parse"]
      if short:
          gitcmd.append("--short")
      gitcmd.append("HEAD")
      try:
          gitsha = (
              subprocess.check_output(gitcmd).strip().decode("utf8")
          )
      except Exception as e:
          sys.stderr.write("git command error :%s\n" % e)
          return None
      # check if we have a clean tree
      gitcmd = ["git", "-C", aubio_dir, "status", "--porcelain"]
      try:
          output = subprocess.check_output(gitcmd).decode("utf8")
          if len(output):
              sys.stderr.write("Info: current tree is not clean\n\n")
              sys.stderr.write(output + "\n")
              gitsha += "+mods"
      except subprocess.CalledProcessError as e:
          sys.stderr.write("git command error :%s\n" % e)
          pass
      return gitsha
  
imports: import os
  import sys
label_desc: Use image node_id 5 for calling a global function with example usage: get_git_revision_hash(short) and returns: gitsha, None, None