<｜begin▁of▁sentence｜>### Instruction:
Given a graph with weighted edges [('A', 'B', 3), ('A', 'C', 7), ('B', 'D', 5), ('C', 'D', 6), ('D', 'E', 2), ('E', 'A', 2)], compute a minimum-weight maximal matching using NetworkX.
### Response:
import networkx as nx

# Create a weighted undirected graph
G = nx.Graph()
G.add_weighted_edges_from([('A', 'B', 3), ('A', 'C', 7), ('B', 'D', 5), ('C', 'D', 6), ('D', 'E', 2), ('E', 'A', 2)])

# Compute a minimum-weight maximal matching
matching = nx.algorithms.matching.min_weight_matching(G, maxcardinality=True)

print(matching)
<|EOT|>
