code: def getVersionStrings(pkg):
      """
      Returns 4 version strings:
  
        * the version string to use for this build,
        * version string requested with --force-version (or None)
        * version string that describes the current git checkout (or None).
        * version string in the pkg/__init__.py,
  
      The first return value is (forceVersion or gitVersion or initVersion).
      """
  
      ## Determine current version string from __init__.py
      initVersion = getInitVersion(pkgroot=pkg)
  
      # If this is a git checkout
      # try to generate a more descriptive version string
      try:
          gitVersion = getGitVersion(tagPrefix=pkg + "-")
      except:
          gitVersion = None
          sys.stderr.write(
              "This appears to be a git checkout, but an error "
              "occurred while attempting to determine a version "
              "string for the current commit.\n"
          )
          sys.excepthook(*sys.exc_info())
  
      # See whether a --force-version flag was given
      forcedVersion = None
      for i, arg in enumerate(sys.argv):
          if arg.startswith("--force-version"):
              if arg == "--force-version":
                  forcedVersion = sys.argv[i + 1]
                  sys.argv.pop(i)
                  sys.argv.pop(i)
              elif arg.startswith("--force-version="):
                  forcedVersion = sys.argv[i].replace(
                      "--force-version=", ""
                  )
                  sys.argv.pop(i)
  
      ## Finally decide on a version string to use:
      if forcedVersion is not None:
          version = forcedVersion
      else:
          version = initVersion
          # if git says this is a modified branch, add local version information
          if gitVersion is not None:
              _, _, local = gitVersion.partition("+")
              if local != "":
                  version = version + "+" + local
                  sys.stderr.write(
                      "Detected git commit; "
                      + "will use version string: '%s'\n" % version
                  )
  
      return version, forcedVersion, gitVersion, initVersion
  
imports: from contextlib import suppress
  import json
  import os
  import re
  import shutil
  import subprocess
  import sys
  from distutils import core
  from typing import Dict, Any
  from .generateChangelog import generateDebianChangelog
label_desc: Use image node_id 10 for calling a global function with example usage: getVersionStrings(pkg) and returns: version,  forcedVersion,  gitVersion,  initVersion