def selfloop_edges(self, data=False, keys=False, default=None):
        if data is True:
            if keys:
                return ((n, n, k, d)
                        for n, nbrs in self.adj.items()
                        if n in nbrs for k, d in nbrs[n].items())
            else:
                return ((n, n, d)
                        for n, nbrs in self.adj.items()
                        if n in nbrs for d in nbrs[n].values())
        elif data is not False:
            if keys:
                return ((n, n, k, d.get(data, default))
                        for n, nbrs in self.adj.items()
                        if n in nbrs for k, d in nbrs[n].items())
            else:
                return ((n, n, d.get(data, default))
                        for n, nbrs in self.adj.items()
                        if n in nbrs for d in nbrs[n].values())
        else:
            if keys:
                return ((n, n, k)
                        for n, nbrs in self.adj.items()
                        if n in nbrs for k in nbrs[n].keys())
            else:
                return ((n, n)
                        for n, nbrs in self.adj.items()
                        if n in nbrs for d in nbrs[n].values())
Return a list of selfloop edges.
dataset/ETHPy150Open networkx/networkx/networkx/classes/multigraph.py/MultiGraph.selfloop_edges