<｜begin▁of▁sentence｜>### Instruction:
Given a graph with a mixture of loop and non-loop edges, can you identify which edges are loops (an edge connecting a vertex to itself) using the is_loop method from igraph?
### Response:
import igraph as ig

# Create a simple graph with potential loops
g = ig.Graph([(0, 1), (1, 2), (2, 2)]) # Note: (2, 2) forms a loop on vertex 2

# Check each edge to see if it is a loop and print the result
for edge in g.es:
    is_loop = edge.is_loop()
    print(f'Edge {edge.tuple} is a loop: {is_loop}')
<|EOT|>
