<｜begin▁of▁sentence｜>### Instruction:
Given the desire to create a random graph that models network growth under a dual probability scheme for preferential attachment, where each new node has either `m1` chances (with probability `p`) or `m2` chances (with probability `1-p`) to attach to existing high-degree nodes, how can one generate and visualize such a graph using NetworkX for a specified number of nodes, edges to attach, and probability?
### Response:
import networkx as nx

# Parameters for the graph
n = 100  # Number of nodes
m1 = 2   # Number of edges to link with probability p
m2 = 3   # Number of edges to link with probability (1-p)
p = 0.5  # Probability of attaching m1 edges
seed = 42  # Seed for random number generator

# Generate the graph
G = nx.dual_barabasi_albert_graph(n, m1, m2, p, seed=seed)

# Draw the graph
import matplotlib.pyplot as plt
nx.draw(G, with_labels=True)
plt.show()
<|EOT|>
