def ordered_edges_iter(self, nbunch=None, data=False, keys=False):
    'Return an iterator over the edges in temporal order.\n\n        Ordered edges are returned as tuples with optional data and keys\n        in the order (t1, t2, key, data).\n\n        Parameters\n        ----------\n        nbunch : iterable container, optional (default= all nodes)\n            A container of nodes. The container will be iterated\n            through once.\n        data : bool, optional (default=False)\n            If True, return edge attribute dict with each edge.\n        keys : bool, optional (default=False)\n            If True, return edge keys with each edge.\n\n        Returns\n        -------\n        edge_iter : iterator\n            An iterator of (u,v), (u,v,d) or (u,v,key,d) tuples of edges.\n\n        Notes\n        -----\n        Nodes in nbunch that are not in the graph will be (quietly) ignored.\n        For the same reason you should not completely trust temporal_sort,\n        use ordered_edges_iter with care.\n        '
    nodes = self.temporal_sort()
    if nbunch:
        nbunch = list(nbunch)
        nodes = [n for n in nodes if (n in nbunch)]
    return self.edges_iter(nbunch=nodes, data=data, keys=keys)
Return an iterator over the edges in temporal order.

Ordered edges are returned as tuples with optional data and keys
in the order (t1, t2, key, data).

Parameters
----------
nbunch : iterable container, optional (default= all nodes)
    A container of nodes. The container will be iterated
    through once.
data : bool, optional (default=False)
    If True, return edge attribute dict with each edge.
keys : bool, optional (default=False)
    If True, return edge keys with each edge.

Returns
-------
edge_iter : iterator
    An iterator of (u,v), (u,v,d) or (u,v,key,d) tuples of edges.

Notes
-----
Nodes in nbunch that are not in the graph will be (quietly) ignored.
For the same reason you should not completely trust temporal_sort,
use ordered_edges_iter with care.
def ordered_edges_iter(self, nbunch=None, data=False, keys=False):
    'Return an iterator over the edges in temporal order.\n\n        Ordered edges are returned as tuples with optional data and keys\n        in the order (t1, t2, key, data).\n\n        Parameters\n        ----------\n        nbunch : iterable container, optional (default= all nodes)\n            A container of nodes. The container will be iterated\n            through once.\n        data : bool, optional (default=False)\n            If True, return edge attribute dict with each edge.\n        keys : bool, optional (default=False)\n            If True, return edge keys with each edge.\n\n        Returns\n        -------\n        edge_iter : iterator\n            An iterator of (u,v), (u,v,d) or (u,v,key,d) tuples of edges.\n\n        Notes\n        -----\n        Nodes in nbunch that are not in the graph will be (quietly) ignored.\n        For the same reason you should not completely trust temporal_sort,\n        use ordered_edges_iter with care.\n        '
    nodes = self.temporal_sort()
    if nbunch:
        nbunch = list(nbunch)
        nodes = [n for n in nodes if (n in nbunch)]
    return self.edges_iter(nbunch=nodes, data=data, keys=keys)