code: def git_get_keywords(versionfile_abs: str) -> Dict[str, str]:
      """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: Dict[str, str] = {}
      try:
          with open(versionfile_abs, "r") as fobj:
              for line in fobj:
                  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)
      except OSError:
          pass
      return keywords
  
imports: import configparser
  import errno
  import json
  import os
  import re
  import subprocess
  import sys
  from pathlib import Path
  from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union
  from typing import NoReturn
  import functools
label_desc: Use image node_id 5 for calling a global function with example usage: git_get_keywords(versionfile_abs) and returns: keywords