def selfloop_edges(self, data=False):
        if data:
            return [ (n,n,nbrs[n])
                     for n,nbrs in self.adj.items() if n in nbrs ]
        else:
            return [ (n,n)
                     for n,nbrs in self.adj.items() if n in nbrs ]
Return a list of selfloop edges.
dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/classes/graph.py/Graph.selfloop_edges