def resolve_paralell(items, deps):
    """ Returns a list of sets of tasks that can be done paralelly """
    items = set(items)
    built = set()
    out = []
    while True:
        if not items:
            break

        no_d = set(no_deps(items, deps, built))
        items -= no_d
        
        built |= no_d
        out.append(no_d)
        
        if set(sum(deps.values(), [])) == built:
            out.append(items)
            break
        
    return out
 Returns a list of sets of tasks that can be done paralelly 
recipes/Python/576569_Dependency_resolver/recipe-576569.py