<｜begin▁of▁sentence｜>### Instruction:
Given a graph with edge set [('A', 'B', weight=1), ('A', 'C', weight=3), ('B', 'C', weight=2), ('B', 'D', weight=4), ('C', 'D', weight=5)], how do you find the maximum spanning tree using NetworkX?
### Response:
import networkx as nx

# Create a weighted graph
G = nx.Graph()
G.add_edge('A', 'B', weight=1)
G.add_edge('A', 'C', weight=3)
G.add_edge('B', 'C', weight=2)
G.add_edge('B', 'D', weight=4)
G.add_edge('C', 'D', weight=5)

# Compute the maximum spanning tree
T = nx.maximum_spanning_tree(G, algorithm='kruskal')

# Print the edges of the maximum spanning tree
print(sorted(T.edges(data=True)))
<|EOT|>
