<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with vertices {'A', 'B', 'C', 'D', 'E'} and edges {('A', 'B'), ('A', 'C'), ('B', 'D'), ('C', 'D'), ('D', 'E')}, can you use the immediate_dominators function in networkx to generate the dominator tree starting from node 'A'? You need to print the dominator tree as a result.
### Response:
import networkx as nx

# Create a directed graph
G = nx.DiGraph()

# Add edges
G.add_edge('A', 'B')
G.add_edge('A', 'C')
G.add_edge('B', 'D')
G.add_edge('C', 'D')
G.add_edge('D', 'E')

# Compute the dominator tree starting from 'A'
dom_tree = nx.immediate_dominators(G, 'A')

# Print the dominator tree
print(dom_tree)
<|EOT|>
