code: def run_setup(setup_script, args):
      """Run a distutils setup script, sandboxed in its directory"""
      setup_dir = os.path.abspath(os.path.dirname(setup_script))
      with setup_context(setup_dir):
          try:
              sys.argv[:] = [setup_script] + list(args)
              sys.path.insert(0, setup_dir)
              # reset to include setup dir, w/clean callback list
              working_set.__init__()
              working_set.callbacks.append(lambda dist: dist.activate())
  
              # __file__ should be a byte string on Python 2 (#712)
              dunder_file = (
                  setup_script
                  if isinstance(setup_script, str)
                  else setup_script.encode(sys.getfilesystemencoding())
              )
  
              with DirectorySandbox(setup_dir):
                  ns = dict(__file__=dunder_file, __name__="__main__")
                  _execfile(setup_script, ns)
          except SystemExit as v:
              if v.args and v.args[0]:
                  raise
  
imports: import os
  import sys
  import tempfile
  import operator
  import functools
  import itertools
  import re
  import contextlib
  import pickle
  import textwrap
  from setuptools.extern import six
  from setuptools.extern.six.moves import builtins, map
  import pkg_resources.py31compat
  from distutils.errors import DistutilsError
  from pkg_resources import working_set
label_desc: Use image node_id 12 for calling a global function with example usage: run_setup(setup_script, args) without return types