<｜begin▁of▁sentence｜>### Instruction:
Imagine that in preparing for a therapy session, as a Music Therapist looking to explore the complex interplay of relationships within a music ensemble, you're keen on simulating the potential collaborations between musicians. Picture this: you have a group of 10 musicians, and you're curious about the various duo partnerships that could form, knowing that each pair has an equal chance of collaboratively performing. To map out all possible pairings, you aim to create a visual representation, akin to a musical network, using a computer program that instills randomness to mirror the spontaneity of creative connections, with each partnership having a 50% chance of emerging.

To aid in planning future sessions, you want to make sure that you can create this network consistently, so you can study it further and perhaps notice patterns over time or after successive simulations. Could you articulate how you might design such a network using digital tools that ensures dependable replication of this harmonious graph?
### Response:
import networkx as nx

# Use the fast_gnp_random_graph function to generate a random graph
n = 10  # number of nodes
p = 0.5  # probability of edge creation
seed = 42  # seed for random number generation
directed = False  # indicate if the graph is directed or undirected

# Create the random graph
G = nx.fast_gnp_random_graph(n, p, seed=seed, directed=directed)

# Print the generated graph
print('Nodes:', G.nodes())
print('Edges:', G.edges())
<|EOT|>
