def find_modules(scripts=(), includes=(), packages=(), excludes=(), path=None, debug=0):
 scripts = set(scripts)
 includes = set(includes)
 packages = set(packages)
 excludes = set(excludes)
 plat_prepare(includes, packages, excludes)
 mf = modulegraph.ModuleGraph(path=path, excludes=(excludes - includes), implies=get_implies(), debug=debug)
 find_needed_modules(mf, scripts, includes, packages)
 return mf

def find_modules ( scripts = ( ) , includes = ( ) , packages = ( ) , excludes = ( ) , path = None , debug = 0 ) : scripts = set ( scripts ) includes = set ( includes ) packages = set ( packages ) excludes = set ( excludes ) plat_prepare ( includes , packages , excludes ) mf = modulegraph . ModuleGraph ( path = path , excludes = ( excludes - includes ) , implies = get_implies ( ) , debug = debug ) find_needed_modules ( mf , scripts , includes , packages ) return mf
used to dynamically load custom classes .