Implement Bfs Using Python Libraries