<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with nodes labeled from 1 to 4 and weighted edges ((1, 2, 3), (1, 3, 2), (2, 3, 5), (3, 4, 4)), how can you find the maximum spanning arborescence of this graph?
### Response:
import networkx as nx

# Create a directed graph
G = nx.DiGraph()

# Add weighted edges to the graph
G.add_weighted_edges_from([(1, 2, 3), (1, 3, 2), (2, 3, 5), (3, 4, 4)])

# Find the maximum spanning arborescence
arborescence = nx.maximum_spanning_arborescence(G)

# Print the edges in the maximum spanning arborescence
print(arborescence.edges(data=True))
<|EOT|>
