'This returns a key for the spec *including* DAG structure.
The key is the concatenation of:
1. A tuple describing this node in the DAG.
2. The hash of each of this node\'s dependencies\' cmp_keys.'

def _cmp_key(self):

    if self._cmp_key_cache:
        return self._cmp_key_cache
    dep_tuple = tuple(((d.spec.name, hash(d.spec), tuple(sorted(d.deptypes))) for (name, d) in sorted(self._dependencies.items())))
    key = (self._cmp_node(), dep_tuple)
    if self._concrete:
        self._cmp_key_cache = key
    return key
