def METHOD_NAME():
    try:
        proc = subprocess.Popen(
            ("git", "describe", "--long", "--tags", "--match", "[0-9]*.*"),
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
        )
        data, stderr = proc.communicate()
        if proc.returncode:
            return None
        ver = data.decode().splitlines()[0].strip()
    except Exception:
        return None
    if not ver:
        return None
    m = re.search(_GIT_DESCRIPTION_RE, ver)
    if not m:
        sys.stderr.write(
            "version: git description (%s) is invalid, " "ignoring\n" % ver
        )
        return None
    commits = int(m.group("commits"))
    if not commits:
        return m.group("ver")
    else:
        return "%s.post%d.dev%d" % (m.group("ver"), commits, int(m.group("sha"), 16))