'Returns a list of paths (shorter than or equal to given length) connecting the two nodes.'

def paths(self, node1, node2, length=4, path=[]):

    if (not isinstance(node1, Node)):
        node1 = self[node1]
    if (not isinstance(node2, Node)):
        node2 = self[node2]
    return [[self[id] for id in p] for p in paths(self, node1.id, node2.id, length, path)]
