<｜begin▁of▁sentence｜>### Instruction:
Given a star graph with 4 nodes, how can you use NetworkX to generate 2 random paths of length 4?
### Response:
import networkx as nx

# Create a star graph with 4 nodes
G = nx.star_graph(3)

# Randomly generate 2 paths of length 4
random_paths = list(nx.generate_random_paths(G, sample_size=2, path_length=4))

# Print the randomly generated paths
for path in random_paths:
    print(path)
<|EOT|>
