code: def git_get_keywords(versionfile_abs):
      """Extract version information from the given file."""
      # the code embedded in _version.py can just fetch the value of these
      # keywords. When used from setup.py, we don't want to import _version.py,
      # so we do it with a regexp instead. This function is not used from
      # _version.py.
      keywords = {}
      try:
          f = open(versionfile_abs)
          for line in f.readlines():
              if line.strip().startswith("git_refnames ="):
                  mo = re.search(r'=\s*"(.*)"', line)
                  if mo:
                      keywords["refnames"] = mo.group(1)
              if line.strip().startswith("git_full ="):
                  mo = re.search(r'=\s*"(.*)"', line)
                  if mo:
                      keywords["full"] = mo.group(1)
              if line.strip().startswith("git_date ="):
                  mo = re.search(r'=\s*"(.*)"', line)
                  if mo:
                      keywords["date"] = mo.group(1)
          f.close()
      except OSError:
          pass
      return keywords
  
imports: import errno
  import json
  import os
  import re
  import subprocess
  import sys
label_desc: Use image node_id 5 for calling a global function with example usage: git_get_keywords(versionfile_abs) and returns: keywords