'Get the path(s) from this synset to the root, where each path is a
list of the synset nodes traversed on the way to the root.
:return: A list of lists, where each list gives the node sequence
connecting the initial ``Synset`` node and a root node.'

def hypernym_paths(self):

    paths = []
    hypernyms = (self.hypernyms() + self.instance_hypernyms())
    if (len(hypernyms) == 0):
        paths = [[self]]
    for hypernym in hypernyms:
        for ancestor_list in hypernym.hypernym_paths():
            ancestor_list.append(self)
            paths.append(ancestor_list)
    return paths
