code: def zap_pyfiles(self):
      log.info("Removing .py files from temporary directory")
      for base, dirs, files in walk_egg(self.bdist_dir):
          for name in files:
              path = os.path.join(base, name)
  
              if name.endswith(".py"):
                  log.debug("Deleting %s", path)
                  os.unlink(path)
  
              if base.endswith("__pycache__"):
                  path_old = path
  
                  pattern = r"(?P<name>.+)\.(?P<magic>[^.]+)\.pyc"
                  m = re.match(pattern, name)
                  path_new = os.path.join(
                      base, os.pardir, m.group("name") + ".pyc"
                  )
                  log.info(
                      "Renaming file from [%s] to [%s]"
                      % (path_old, path_new)
                  )
                  try:
                      os.remove(path_new)
                  except OSError:
                      pass
                  os.rename(path_old, path_new)
  
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 the bdist_egg obj's underlying member method code with example usage: obj.zap_pyfiles() without return types