code: def get_env(build_dir):
      # Get environmental variables first
      ENV = dict(os.environ)
  
      # Get values listed in the CMakeCache.txt file (if existant)
      try:
          var_regex = r"^([^:]+):([^=]+)=(.*)$"
          cache_path = os.path.join(build_dir, "CMakeCache.txt")
          with open(cache_path, "r") as cache_file:
              for line in cache_file:
                  line = line.strip()
                  m = re.match(var_regex, line)
                  if m:
                      ENV[m.group(1)] = m.group(3)
      except:
          pass
  
      # Get values passed on the command line
      i = 0
      for i, arg in enumerate(sys.argv[1:]):
          try:
              key, value = arg.split("=", 1)
          except ValueError:
              break
          ENV[key] = value
      del sys.argv[1 : i + 1]
  
      return ENV
  
imports: import distutils.sysconfig
  import logging
  import platform
  import zipfile
  import sys
  from distutils.command.build import build
  from distutils.command.build_py import build_py
  from distutils.command.install_data import install_data
  from distutils.errors import DistutilsSetupError
  from distutils.spawn import find_executable
  from distutils.sysconfig import get_python_lib
  from multiprocessing import cpu_count
  from subprocess import Popen
  import os
  import re
  from Cython.Distutils import build_ext
  from setuptools import setup
  from setuptools.extension import Extension
  from shutil import rmtree, copytree, copy
  import urllib
label_desc: Use image node_id 5 for calling a global function with example usage: get_env(build_dir) and returns: ENV