'Perform Khan\'s simple topological sort algorithm from \'62.
See https://en.wikipedia.org/wiki/Topological_sorting'

def _khan62(self):

    count = Counter()
    result = []
    for node in self:
        for successor in self[node]:
            count[successor] += 1
    ready = [node for node in self if (not count[node])]
    while ready:
        node = ready.pop()
        result.append(node)
        for successor in self[node]:
            count[successor] -= 1
            if (count[successor] == 0):
                ready.append(successor)
    result.reverse()
    return result
