<｜begin▁of▁sentence｜>### Instruction:
Given a seed value of 42, how do you create a reproducible random state object to generate a random Erdős-Rényi graph with 10 nodes and a probability of 0.5 for edge creation?
### Response:
import networkx as nx
import numpy as np

# Seed for reproducibility
seed = 42

# Create a random state object using the given seed
random_state = nx.utils.create_random_state(seed)

# Generate a random graph using the random state object
G = nx.erdos_renyi_graph(n=10, p=0.5, seed=random_state)

# Print the edges of the random graph
print(G.edges())
<|EOT|>
