<｜begin▁of▁sentence｜>### Instruction:
Imagine we're designing the information architecture for a digital network system, and we're considering the optimal pathways for data to traverse a network of nodes. The network is represented by a graph with nodes connected by edges weighted according to their cost or distance. The dataset for our network includes the following connections with associated weights: 1 is connected to 2 with a weight of 10, 2 is connected to 3 with a weight of 15, 1 is connected to 3 with a weight of 5, and 3 is connected to 4 with a weight of 10.

To ensure an efficient framework that maintains full connectivity between all nodes with minimal cost, we would like to investigate the possible configurations of spanning trees. Specifically, we would like to employ the SpanningTreeIterator tool within the NetworkX library to enumerate all the potential spanning trees of the graph, arranged by their cumulative weight from lowest to highest. This analysis will aid in identifying the most cost-effective structure for the information pathways within our digital network scenario. Can we proceed to set up this to model the various spanning architectures?
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()
G.add_weighted_edges_from([(1, 2, 10), (2, 3, 15), (1, 3, 5), (3, 4, 10)])

# Create iterator for all spanning trees in increasing cost
trees = nx.algorithms.tree.mst.SpanningTreeIterator(G, weight='weight', minimum=True)

# Iterate and print the edges of each spanning tree
for tree in trees:
    print(sorted(tree.edges(data=True)))
<|EOT|>
