<｜begin▁of▁sentence｜>### Instruction:
In the context of evaluating the integrity of a company's workflow network, we've mapped out the process interactions within a directed graph. The connections are represented by the following edges: [(0, 1), (2, 1), (3, 4)]. As a Quality Control Inspector, you've been tasked with assessing the cohesiveness of the processes. To do this, could you determine the total number of isolated groupings of processes when we consider the workflow direction as non-specific? This will help us identify if there are any independent clusters that are not tightly integrated with the main workflow.
### Response:
import networkx as nx

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

# Add edges
G.add_edge(0, 1)
G.add_edge(2, 1)
G.add_edge(3, 4)

# Get the number of weakly connected components
num_components = nx.number_weakly_connected_components(G)

print('Number of weakly connected components:', num_components)
<|EOT|>
