def find_root(self):
self.find_parents()<EOL>index = <NUM_LIT:0><EOL>while len(self.vertices[index].parents)><NUM_LIT:0>:<EOL><INDENT>index = self.vertices[index].parents[<NUM_LIT:0>]<EOL><DEDENT>return index<EOL>
Finds the index of the root node of the tree.