<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph whose edge set is [(0, 1), (1, 2), (2, 3), (3, 4)] and an additional isolated node 5, can you determine if the graph is weakly connected using NetworkX?
### Response:
import networkx as nx

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

# Add edges
G.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 4)])
G.add_node(5)

# Test if the directed graph is weakly connected
is_connected = nx.is_weakly_connected(G)
print('Is the digraph weakly connected?', is_connected)
<|EOT|>
