<｜begin▁of▁sentence｜>### Instruction:
Given a graph with edge set [(1, 2, 3), (2, 3, 2), (3, 4, 1), (4, 1, 1), (1, 3, 4)], use the 'one_exchange' algorithm from NetworkX to find the maximum cut. What is the resulting cut value and the corresponding partition of the graph's nodes?
### Response:
import networkx as nx
from networkx.algorithms import approximation as approx

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

# Use the one_exchange algorithm to find a maximum cut
seed = 42 # For reproducibility
cut_value, partition = approx.one_exchange(G, seed=seed)

print('Cut value:', cut_value)
print('Partition:', partition)
<|EOT|>
