<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edge set [('A', 'B'), ('A', 'C'), ('B', 'C'), ('C', 'D'), ('D', 'E')], and a set of nodes S = {'A', 'B', 'C'}, can you calculate the boundary expansion of the set S using NetworkX?
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()
G.add_edges_from([('A', 'B'), ('A', 'C'), ('B', 'C'), ('C', 'D'), ('D', 'E')])

# Define a set of nodes
S = {'A', 'B', 'C'}

# Calculate the boundary expansion of the set S
expansion = nx.boundary_expansion(G, S)

print('Boundary expansion of set S:', expansion)
<|EOT|>
