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 networkx/networkx/networkx/classes/tests/timingclasses.py/TimingGraph.nodes_with_selfloops