<｜begin▁of▁sentence｜>### Instruction:
Given the NetworkX API 'dense_gnm_random_graph', which is used to create a dense random graph with a specified number of nodes and edges, the above example generates a graph with 10 nodes and 40 edges using a fixed random seed to ensure reproducibility. The code then prints out the actual number of nodes and edges in the generated graph. Can you create such a graph and verify the number of its nodes and edges?
### Response:
import networkx as nx

# Number of nodes
n = 10
# Number of edges
m = 40

# Create a dense graph with n nodes and m edges
G = nx.dense_gnm_random_graph(n, m, seed=42)

# Print the number of nodes and edges in the graph
print('Number of nodes in the graph:', G.number_of_nodes())
print('Number of edges in the graph:', G.number_of_edges())
<|EOT|>
