def calcDescendantCount(self):
        nodes = dict()
        sortedNodes = topological_sort(self)
        sortedNodes.reverse()
        for node in sortedNodes:
            if nodes not in node:
                ids = set()
            else:
                ids = nodes[node]

            self.node[node]['data'].descendantCount = len(ids)
            ids = ids.union([node])

            for parent in self.predecessors(node):
                if parent not in nodes:
                    nodes[parent] = ids
                else:
                    nodes[parent] = nodes[parent].union(ids)

    # Return the number of descendants of the given node.
    # Calculates the count if it had not already been done so
    # @param goid The GO ID of the node to return the descendant count of
dataset/ETHPy150Open CGATOxford/cgat/scripts/revigo.py/GOGraph.calcDescendantCount/swapped operands of `not in`