<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edge set [('A', 'B'), ('A', 'C'), ('B', 'D'), ('C', 'E')], use the 'degree' method in NetworkX to find the degree of node 'A' and the degrees of all nodes in the graph.
### Response:
import networkx as nx

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

# Get the degree of node 'A'
degree_A = G.degree['A']
print('Degree of node A:', degree_A)

# Get the degrees of all nodes
degrees = G.degree()
print('Degrees of all nodes:', dict(degrees))
<|EOT|>
