code: def get_config_from_root(root):
      # This might raise EnvironmentError (if setup.cfg is missing), or
      # configparser.NoSectionError (if it lacks a [versioneer] section), or
      # configparser.NoOptionError (if it lacks "VCS="). See the docstring at
      # the top of versioneer.py for instructions on writing your setup.cfg .
      setup_cfg = os.path.join(root, "setup.cfg")
      parser = configparser.SafeConfigParser()
      with open(setup_cfg, "r") as f:
          parser.readfp(f)
      VCS = parser.get("versioneer", "VCS")  # mandatory
  
      def get(parser, name):
          if parser.has_option("versioneer", name):
              return parser.get("versioneer", name)
          return None
  
      cfg = VersioneerConfig()
      cfg.VCS = VCS
      cfg.style = get(parser, "style") or ""
      cfg.versionfile_source = get(parser, "versionfile_source")
      cfg.versionfile_build = get(parser, "versionfile_build")
      cfg.tag_prefix = get(parser, "tag_prefix")
      cfg.parentdir_prefix = get(parser, "parentdir_prefix")
      cfg.verbose = get(parser, "verbose")
      return cfg
  
imports: from __future__ import print_function
  import errno
  import json
  import os
  import re
  import subprocess
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: get_config_from_root(root) and returns: cfg, None, parser