<｜begin▁of▁sentence｜>### Instruction:
Given the parameters `n=6` for number of nodes and `m=10` for number of edges, and using a `seed=42` for reproducibility, can you generate a G_{n,m} random graph using the `gnm_random_graph` function provided by NetworkX and display its nodes and edges?
### Response:
import networkx as nx

# Use the gnm_random_graph function
g = nx.gnm_random_graph(n=6, m=10, seed=42)

print('Nodes:', g.nodes())
print('Edges:', g.edges())
<|EOT|>
