def find_children(self):
        for i in range(len(self.vertices)):
            self.vertices[i].children = []
        for i in range(len(self.vertices)):
            for parent in self.vertices[i].parents:
                if i not in self.vertices[parent].children:
                    self.vertices[parent].children.append(i)
Take a tree and set the children according to the parents.
dataset/ETHPy150Open SheffieldML/GPy/GPy/util/mocap.py/tree.find_children