code: def _customize_compiler_for_shlib(compiler):
      if sys.platform == "darwin":
          # building .dylib requires additional compiler flags on OSX; here we
          # temporarily substitute the pyconfig.h variables so that distutils'
          # 'customize_compiler' uses them before we build the shared libraries.
          tmp = _CONFIG_VARS.copy()
          try:
              # XXX Help!  I don't have any idea whether these are right...
              _CONFIG_VARS[
                  "LDSHARED"
              ] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup"
              _CONFIG_VARS["CCSHARED"] = " -dynamiclib"
              _CONFIG_VARS["SO"] = ".dylib"
              customize_compiler(compiler)
          finally:
              _CONFIG_VARS.clear()
              _CONFIG_VARS.update(tmp)
      else:
          customize_compiler(compiler)
  
imports: import os
  import sys
  import itertools
  from distutils.command.build_ext import build_ext
  from distutils.file_util import copy_file
  from distutils.ccompiler import new_compiler
  from distutils.sysconfig import customize_compiler, get_config_var
  from distutils.errors import DistutilsError
  from distutils import log
  from setuptools.extension import Library
  from setuptools.extern import six
  from distutils.sysconfig import _config_vars
label_desc: Use image node_id 1 for calling a global function with example usage: _customize_compiler_for_shlib(compiler) without return types