importmatplotlib.pyplotaspltimportnetworkxasnx# Example data: a directed graph with nodes and edgesnodes=['A','B','C','D','E']edges=[('A','B'),('A','C'),('B','D'),('C','E'),('D','E')]# Create a directed graph objectgraph=nx.DiGraph()# Add nodes to the graphgraph.add_nodes_from(nodes)# Add edges to the graphgraph.add_edges_from(edges)# Draw the graph using matplotlibnx.draw(graph,with_labels=True,node_color='lightblue',node_size=500,font_size=10,arrowsize=20)# Display the graphplt.show()