code: def version(path):
      """Obtain the packge version from a python file e.g. pkg/__init__.py
      See <https://packaging.python.org/en/latest/single_source_version.html>.
      """
      version_file = read(path)
      version_match = re.search(
          r"""^__version__ = ['"]([^'"]*)['"]""", version_file, re.M
      )
      if version_match:
          return version_match.group(1)
      raise RuntimeError("Unable to find version string.")
  
imports: import io
  import os
  import re
  from setuptools import setup
label_desc: Use image node_id 3 for calling a global function with example usage: version(path) and returns: version_match