def METHOD_NAME(package_name):
    '''
    Checks all subpackages and modules in the package_name package.
    '''
    cwd = nt.getcwd()
    if cwd==CPY_LIB_DIR:
        root_name = package_name
    else:
        root_name = cwd.split(CPY_DIR + "\\Lib\\")[1].replace("\\", ".") + "." + package_name
    #First check that the root package can be imported 
    try:
        import_helper(package_name)    
        log_ok(root_name)
    except (Exception, SystemExit) as e:
        log_broken(root_name, e)
        # no sense continuing
        return
    #Next examine subpackages and modules
    nt.chdir(cwd + "\\" + package_name)        
    for x in nt.listdir("."):
        if x.endswith(".py") and x not in ("__init__.py", '__main__.py'):
            x = x.split(".py", 1)[0]
            mod_name = nt.getcwd().split(CPY_DIR + "\\Lib\\")[1] + "\\" + x
            mod_name = mod_name.replace("\\", ".")
            try:
                import_helper(mod_name)   
                log_ok(mod_name) 
            except (Exception, SystemExit) as e:
                log_broken(mod_name, e)
        elif is_package(x) and not x.startswith('test'):
            METHOD_NAME(x)
    nt.chdir(cwd)