<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edge set [(0, 1), (0, 2), (2, 3), (3, 4)], can you construct an iterator to perform a breadth-first search starting from the vertex 0 and print the vertices along with their depth in the search tree?
### Response:
import igraph as ig

# Create a graph with some edges
g = ig.Graph(edges=[(0, 1), (0, 2), (2, 3), (3, 4)])

# Construct a BFS iterator starting from the first vertex
bfs_iter = g.bfsiter(0)

# Use the BFS iterator to print the vertices in BFS order
for visit_info in bfs_iter:
    print(f'Visited vertex: {visit_info[0]}, Depth: {visit_info[2]}')
<|EOT|>
