<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges [(0, 1), (0, 2), (1, 3), (1, 4), (3, 4)], can you perform a breadth-first search (BFS) starting from vertex 0 and print the vertices in the order they are visited?
### Response:
import igraph as ig

# Create a graph
edges = [(0, 1), (0, 2), (1, 3), (1, 4), (3, 4)]
graph = ig.Graph(edges=edges, directed=True)

# Initialize BFS iterator from vertex 0
bfs_iter = graph.bfsiter(0, ig.OUT)

# Iterate through the vertices in the BFS order
for vertex in bfs_iter:
    print(vertex.index, vertex)
<|EOT|>
