'Returns a dictionary of nodes, each linked to a list of nodes (shortest path).'

def shortest_paths(self, node, heuristic=None, directed=False):

    if (not isinstance(node, Node)):
        node = self[node]
    p = nodedict(self)
    for (id, path) in dijkstra_shortest_paths(self, node.id, heuristic, directed).items():
        p[self[id]] = ((path and [self[id] for id in path]) or None)
    return p
