code: def scan_module(egg_dir, base, name, stubs):
      """Check whether module possibly uses unsafe-for-zipfile stuff"""
  
      filename = os.path.join(base, name)
      if filename[:-1] in stubs:
          return True  # Extension module
      pkg = base[len(egg_dir) + 1 :].replace(os.sep, ".")
      module = pkg + (pkg and "." or "") + os.path.splitext(name)[0]
      if six.PY2:
          skip = 8  # skip magic & date
      elif sys.version_info < (3, 7):
          skip = 12  # skip magic & date & file size
      else:
          skip = 16  # skip magic & reserved? & date & file size
      f = open(filename, "rb")
      f.read(skip)
      code = marshal.load(f)
      f.close()
      safe = True
      symbols = dict.fromkeys(iter_symbols(code))
      for bad in ["__file__", "__path__"]:
          if bad in symbols:
              log.warn("%s: module references %s", module, bad)
              safe = False
      if "inspect" in symbols:
          for bad in [
              "getsource",
              "getabsfile",
              "getsourcefile",
              "getfile" "getsourcelines",
              "findsource",
              "getcomments",
              "getframeinfo",
              "getinnerframes",
              "getouterframes",
              "stack",
              "trace",
          ]:
              if bad in symbols:
                  log.warn(
                      "%s: module MAY be using inspect.%s", module, bad
                  )
                  safe = False
      return safe
  
imports: from distutils.errors import DistutilsSetupError
  from distutils.dir_util import remove_tree, mkpath
  from distutils import log
  from types import CodeType
  import sys
  import os
  import re
  import textwrap
  import marshal
  from setuptools.extern import six
  from pkg_resources import get_build_platform, Distribution, ensure_directory
  from pkg_resources import EntryPoint
  from setuptools.extension import Library
  from setuptools import Command
label_desc: Use image node_id 7 for calling a global function with example usage: scan_module(egg_dir, base, name, stubs) and returns: safe, True