<｜begin▁of▁sentence｜>### Instruction:
As a network engineer, you've been tasked with building and optimizing the network infrastructure for a rapidly growing company. You have a directed graph representing the company's network with vertices representing different network devices such as routers and switches, and edges representing the connections between these devices. With the help of the networkx library, you need to use the immediate_dominators function to generate a dominator tree starting from the main network device 'A'. This tree will help you identify the critical network components that control the flow of data and play a key role in ensuring efficient communication within the network.
### 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|>
