<｜begin▁of▁sentence｜>### Instruction:
Given a graph where one of its nodes has a self-loop and another edge connecting two different nodes, {'edges': [(1, 1), (1, 2)]}, compute the list of nodes with self loops using the nodes_with_selfloops function from NetworkX.
### Response:
import networkx as nx

G = nx.Graph()
G.add_edge(1, 1)
G.add_edge(1, 2)
nodes_with_loops = list(nx.nodes_with_selfloops(G))
print("Nodes with self loops:", nodes_with_loops)
<|EOT|>
