Matrix traversal using BFS (edge-case heavy).
Asked in the Online technical screening stage.
Implement bfs_matrix(matrix, start_row, start_col). The matrix is rectangular and contains 1 for an open cell and 0 for a blocked cell. Starting at the given coordinate, return reachable open-cell coordinates in BFS order. Explore neighbors in this order: up, right, down, left. Return an empty list for an empty matrix, an invalid start coordinate, or a blocked starting cell.
matrix is a list of binary integer rows. start_row and start_col are integers. Return a list of [row, col] coordinate lists.
def bfs_matrix(matrix, start_row, start_col):