def initialize_modgraph(excludes=(), user_hook_dirs=None):
 logger.info('Initializing module dependency graph...')
 debug = os.environ.get('MODULEGRAPH_DEBUG', 0)
 try:
  debug = int(debug)
 except ValueError:
  debug = 0
 graph = PyiModuleGraph(HOMEPATH, excludes=excludes, implies=get_implies(), debug=debug, user_hook_dirs=user_hook_dirs)
 if (not is_py2):
  logger.info('Analyzing base_library.zip ...')
  required_mods = []
  for m in PY3_BASE_MODULES:
   if is_package(m):
    required_mods += collect_submodules(m)
   else:
    required_mods.append(m)
  for m in required_mods:
   graph.import_hook(m)
 return graph

def initialize_modgraph ( excludes = ( ) , user_hook_dirs = None ) : logger . info ( 'Initializing module dependency graph...' ) debug = os . environ . get ( 'MODULEGRAPH_DEBUG' , 0 ) try : debug = int ( debug ) except ValueError : debug = 0 graph = PyiModuleGraph ( HOMEPATH , excludes = excludes , implies = get_implies ( ) , debug = debug , user_hook_dirs = user_hook_dirs ) if ( not is_py2 ) : logger . info ( 'Analyzing base_library.zip ...' ) required_mods = [ ] for m in PY3_BASE_MODULES : if is_package ( m ) : required_mods += collect_submodules ( m ) else : required_mods . append ( m ) for m in required_mods : graph . import_hook ( m ) return graph
create the module graph and .