<｜begin▁of▁sentence｜>### Instruction:
Given the number of nodes as 10, and the number of edges as 40, how can you generate a dense G_{n,m} random graph using NetworkX, ensuring the randomness is reproducible by setting the seed to 42?
### Response:
import networkx as nx

# Parameters
n = 10  # number of nodes
m = 40  # number of edges
seed = 42  # seed for random number generator

# Generate a dense G_{n,m} random graph
G = nx.dense_gnm_random_graph(n, m, seed)

# Print information about the created graph
print(f'The graph has {G.number_of_nodes()} nodes and {G.number_of_edges()} edges.')
<|EOT|>
