<｜begin▁of▁sentence｜>### Instruction:
{'description': 'Given a directed graph with the edge set [(0, 1), (1, 2), (3, 4), (4, 3)], what is the number of attracting components in the graph?', 'data': 'The graph is represented as a set of edges, where each tuple (u, v) represents a directed edge from node u to node v. Edge set: [(0, 1), (1, 2), (3, 4), (4, 3)].', 'problem': 'The code calculates the number of attracting components (strongly connected components with no outgoing edges) in the given directed graph.'}
### Response:
import networkx as nx

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

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

# Compute the number of attracting components
n_attracting_components = nx.number_attracting_components(G)

print('Number of attracting components:', n_attracting_components)
<|EOT|>
