<｜begin▁of▁sentence｜>### Instruction:
Given a graph whose edge set includes (1, 1) indicating a selfloop and (1, 2) which is a regular edge between two distinct nodes, what is the number of selfloop edges in the graph?
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()

# Add edges including a selfloop
G.add_edge(1, 1)
G.add_edge(1, 2)

# Get the number of selfloops
nloops = nx.number_of_selfloops(G)

# Print the number of selfloops
print(f'The number of selfloops in the graph: {nloops}')
<|EOT|>
