'For depth=0, returns the list of leaf nodes (nodes with only one connection).
For depth=1, returns the list of leaf nodes and their connected nodes, and so on.'

def fringe(self, depth=0, traversable=(lambda node, edge: True)):

    u = []
    [u.extend(n.flatten(depth, traversable)) for n in self.nodes if (len(n.links) == 1)]
    return unique(u)
