<｜begin▁of▁sentence｜>### Instruction:
Given an Erdős–Rényi graph with 10 nodes and a probability of 0.5 for edge creation between node pairs, can you use the rewire_edges function in igraph to rewire the edges with a constant probability of 0.1?
### Response:
from igraph import Graph

# Create a simple graph
g = Graph.Erdos_Renyi(n=10, p=0.5)

# Rewire the edges with a probability of 0.1
rewired_count = g.rewire_edges(prob=0.1)

print(f'Number of rewired edges: {rewired_count}')
<|EOT|>
