def number_of_edges(self, u=None, v=None):
        if u is None: return self.size()
        try:
            edgedata=self.adj[u][v]
        except KeyError:
            return 0 # no such edge
        return len(edgedata)
Return the number of edges between two nodes.
dataset/ETHPy150Open networkx/networkx/networkx/classes/tests/timingclasses.py/TimingMultiGraph.number_of_edges