<｜begin▁of▁sentence｜>### Instruction:
Given a weighted directed graph where the nodes represent tasks and the edges represent dependencies with associated costs, can you find the minimum spanning arborescence that would allow all tasks to be completed while minimizing the total cost of the dependencies?
### Response:
import networkx as nx

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

# Add edges with weights to the graph
G.add_edge('A', 'B', weight=2)
G.add_edge('A', 'C', weight=3)
G.add_edge('B', 'C', weight=4)
G.add_edge('C', 'D', weight=1)
G.add_edge('C', 'E', weight=2)
G.add_edge('D', 'E', weight=3)

# Compute the minimum spanning arborescence
arborescence = nx.minimum_spanning_arborescence(G)

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