def correlate_objects(objects, attr):
    ret = {}
    i = 0
    for obj in objects:
        try:
            my_key = getattr(obj, attr)
        except AttributeError:
            msg = "'%s' object at 'objects[%d]' contains no attribute '%s'"
            tup = type(obj).__name__, i, attr 
            raise AttributeError(msg % tup)
        ret[my_key] = obj
        i += 1
    return ret
Fully connects all non-root nodes.  All nodes are set to be dependents
dataset/ETHPy150Open mikeorr/WebHelpers2/webhelpers2/containers.py/correlate_objects--crossover with--dataset/ETHPy150Open nltk/nltk/nltk/parse/dependencygraph.py/DependencyGraph.connect_graph