'Map the supplied function onto each node in the graph.
Return a dictionary derived from mapping the supplied function onto
each node in the graph.'

def map(self, func):

    return dict(((k, func(n)) for (k, n) in self.items()))
