'Converts and returns the given children_map to a parents_map.'

def get_parents_map(self, children_map):

    parent_map = [[] for _ in children_map]
    for (parent, children) in enumerate(children_map):
        for child in children:
            parent_map[child].append(parent)
    return parent_map
