<｜begin▁of▁sentence｜>### Instruction:
Sure! Imagine we have a theoretical map of a recently discovered planet's communication network between several research outposts. The network is represented as a directed graph detailing one-way communication pathways where each edge has an associated cost, indicating the effort required to send messages. The edges are as follows: a link from Outpost 0 to Outpost 1 with a cost of 1, a link from Outpost 0 to Outpost 2 with a cost of 2, a link from Outpost 1 to Outpost 2 with a cost of 3, a link from Outpost 1 to Outpost 3 with a cost of 4, and finally, a link from Outpost 2 to Outpost 3 with a cost of 5.

As an Astrobiologist, in connection with the optimization of data transmission, you need to analyze this network to determine all possible min-cost schemes for sending data from a central hub to all other stations without any loops. Essentially, we're looking for efficient strategies, akin to "spanning arborescences" in graph terminology, considering only the paths that connect all outposts in a tree-like structure with a direction emanating from the main communication outpost. How would you proceed to examine each possible communication structure in ascending order of their associated cost of transmission?
### Response:
import networkx as nx
from networkx.algorithms.tree.branchings import ArborescenceIterator

# Create a directed graph with weights
G = nx.DiGraph()
G.add_weighted_edges_from([(0, 1, 1), (0, 2, 2), (1, 2, 3), (1, 3, 4), (2, 3, 5)])

# Create an arborescence iterator for minimum spanning arborescences
arb_iter = ArborescenceIterator(G, weight='weight', minimum=True)

# Iterate and print all minimum spanning arborescences
for arb in arb_iter:
    print(nx.tree.tree_to_branches(arb))
<|EOT|>
