<｜begin▁of▁sentence｜>### Instruction:
Given the edge set [('A', 1), ('B', 1), ('C', 2), ('D', 3), ('E', 4)] which represents a bipartite graph, where nodes 'A', 'B', 'C', 'D', 'E' are in one set and nodes 1, 2, 3, 4 are in another set, can you compute and return the two seperate sets of nodes using NetworkX?
### Response:
import networkx as nx
from networkx.algorithms import bipartite

# Create a bipartite graph
B = nx.Graph()
B.add_nodes_from(['A', 'B', 'C', 'D', 'E'], bipartite=0) # Add the node attribute 'bipartite'
B.add_nodes_from([1, 2, 3, 4], bipartite=1)
B.add_edges_from([('A', 1), ('B', 1), ('C', 2), ('D', 3), ('E', 4)])

# Retrieve the two bipartite sets
X, Y = bipartite.sets(B)

print('Bipartite set X:', X)
print('Bipartite set Y:', Y)
<|EOT|>
