def nodes_with_selfloops(self):
        return [ n for n,nbrs in self.adj.items() if n in nbrs ]
Return a list of nodes with self loops.
dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/classes/graph.py/Graph.nodes_with_selfloops