<｜begin▁of▁sentence｜>### Instruction:
Given a graph with an edge set [('A', 'B', {'weight': 2}), ('A', 'C', {'weight': 3}), ('B', 'D', {'weight': 1}), ('C', 'D', {'weight': 4}), ('C', 'E', {'weight': 2})] and two sets of nodes S = {'A', 'B'} and T = {'D', 'E'}, how do you calculate the normalized cut size using NetworkX?
### Response:
import networkx as nx

# Create an undirected graph
G = nx.Graph()
G.add_edges_from([('A', 'B', {'weight': 2}), ('A', 'C', {'weight': 3}), ('B', 'D', {'weight': 1}), ('C', 'D', {'weight': 4}), ('C', 'E', {'weight': 2})])

# Define the two sets of nodes
S = {'A', 'B'}
T = {'D', 'E'}

# Calculate the normalized cut size
norm_cut = nx.normalized_cut_size(G, S, T, weight='weight')
print('Normalized Cut Size:', norm_cut)
<|EOT|>
