code: def getInitVersion(pkgroot):
      """Return the version string defined in __init__.py"""
      path = os.getcwd()
      initfile = os.path.join(path, pkgroot, "__init__.py")
      init = open(initfile).read()
      m = re.search(r"__version__ = (\S+)\n", init)
      if m is None or len(m.groups()) != 1:
          raise Exception(
              "Cannot determine __version__ from init file: "
              + "'%s'!" % initfile
          )
      version = m.group(1).strip("'\"")
      return version
  
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 6 for calling a global function with example usage: getInitVersion(pkgroot) and returns: version