<｜begin▁of▁sentence｜>### Instruction:
As a financial planner, you're tasked with optimizing investment portfolios for your clients. Imagine you have access to a dataset called "graph_weights.gml" which contains information about the interconnectedness and associated weights of various investment opportunities. Your goal is to utilize the "spanning_tree" function in igraph, an investment analysis tool, to determine and display the edges representing the minimum spanning tree. This tree will guide your recommendations, ensuring efficient allocation of resources and maximizing potential returns for your clients.
### Response:
from igraph import Graph
import igraph as ig

# Load a graph from a file (assuming it's in GML format)
g = ig.read('graph_weights.gml')

# Calculate the minimum spanning tree of the graph with weights
g_spanning_tree = g.spanning_tree(weights=g.es['weight'], return_tree=True)

# Print the edges of the minimum spanning tree
for edge in g_spanning_tree.es:
    print(f'Edge: {edge.source}-{edge.target}, Weight: {edge['weight']}')
<|EOT|>
