code: def parseOptions(args=None):
      """
      Parse arguments and update global settings.
      """
      global WORKDIR, DEPSRC, SRCDIR, DEPTARGET
      global UNIVERSALOPTS, UNIVERSALARCHS, ARCHLIST, CC, CXX
      global FW_VERSION_PREFIX
      global FW_SSL_DIRECTORY
  
      if args is None:
          args = sys.argv[1:]
  
      try:
          options, args = getopt.getopt(
              args,
              "?hb",
              [
                  "build-dir=",
                  "third-party=",
                  "sdk-path=",
                  "src-dir=",
                  "dep-target=",
                  "universal-archs=",
                  "help",
              ],
          )
      except getopt.GetoptError:
          print(sys.exc_info()[1])
          sys.exit(1)
  
      if args:
          print("Additional arguments")
          sys.exit(1)
  
      deptarget = None
      for k, v in options:
          if k in ("-h", "-?", "--help"):
              print(USAGE)
              sys.exit(0)
  
          elif k in ("-d", "--build-dir"):
              WORKDIR = v
  
          elif k in ("--third-party",):
              DEPSRC = v
  
          elif k in ("--sdk-path",):
              print(" WARNING: --sdk-path is no longer supported")
  
          elif k in ("--src-dir",):
              SRCDIR = v
  
          elif k in ("--dep-target",):
              DEPTARGET = v
              deptarget = v
  
          elif k in ("--universal-archs",):
              if v in UNIVERSALOPTS:
                  UNIVERSALARCHS = v
                  ARCHLIST = universal_opts_map[UNIVERSALARCHS]
                  if deptarget is None:
                      # Select alternate default deployment
                      # target
                      DEPTARGET = default_target_map.get(v, "10.5")
              else:
                  raise NotImplementedError(v)
  
          else:
              raise NotImplementedError(k)
  
      SRCDIR = os.path.abspath(SRCDIR)
      WORKDIR = os.path.abspath(WORKDIR)
      DEPSRC = os.path.abspath(DEPSRC)
  
      CC, CXX = getTargetCompilers()
  
      FW_VERSION_PREFIX = FW_PREFIX[:] + ["Versions", getVersion()]
      FW_SSL_DIRECTORY = FW_VERSION_PREFIX[:] + ["etc", "openssl"]
  
      print("-- Settings:")
      print("   * Source directory:    %s" % SRCDIR)
      print("   * Build directory:     %s" % WORKDIR)
      print("   * Third-party source:  %s" % DEPSRC)
      print("   * Deployment target:   %s" % DEPTARGET)
      print("   * Universal archs:     %s" % str(ARCHLIST))
      print("   * C compiler:          %s" % CC)
      print("   * C++ compiler:        %s" % CXX)
      print("")
      print(
          " -- Building a Python %s framework at patch level %s"
          % (getVersion(), getFullVersion())
      )
      print("")
  
imports: import platform, os, sys, getopt, textwrap, shutil, stat, time, pwd, grp
label_desc: Use image node_id 21 for calling a global function with example usage: parseOptions(args) without return types