def find_children(self):
for i in range(len(self.vertices)):<EOL><INDENT>self.vertices[i].children = []<EOL><DEDENT>for i in range(len(self.vertices)):<EOL><INDENT>for parent in self.vertices[i].parents:<EOL><INDENT>if i not in self.vertices[parent].children:<EOL><INDENT>self.vertices[parent].children.append(i)<EOL><DEDENT><DEDENT><DEDENT>
Take a tree and set the children according to the parents.

        Takes a tree structure which lists the parents of each vertex
        and computes the children for each vertex and places them in.