def edges(self, nodes=None):
<EOL>edges = set()<EOL>for node in (nodes or iter(self.keys())):<EOL><INDENT>ends = self[node].nodes()<EOL>edges.update([(node, end) for end in ends])<EOL><DEDENT>return tuple(edges)<EOL>
Returns a ``tuple`` of all edges in the ``DictGraph`` an edge is a pair
of **node objects**.

Arguments:

  - nodes(iterable) [default: ``None``] iterable of **node objects** if 
    specified the edges will be limited to those outgoing from one of 
    the specified nodes.