<｜begin▁of▁sentence｜>### Instruction:
Given n=5 nodes and m=10 edges, use NetworkX's gnm_random_graph function to generate a G_{n,m} random graph. Print the resulting nodes and edges.
### Response:
import networkx as nx

# Parameters for the G_{n,m} random graph
n = 5  # Number of nodes
m = 10  # Number of edges
seed = 42  # Seed for the random number generator

gnm_graph = nx.gnm_random_graph(n, m, seed=seed)

# Print nodes and edges of the graph
print('Nodes:', gnm_graph.nodes())
print('Edges:', gnm_graph.edges())
<|EOT|>
