code: def extract_code_objects(pe):
      
      script_res = _get_scripts_resource(pe)
      dump = _resource_dump(pe, script_res)
      return _get_co_from_dump(dump)
docs: Extract Python code objects from a py2exe executable.