def swap_bbox_format(bbox_tuple):
    """Swap between (row0, col0, row1, col1) and (x0, y0, x1, y1) formats."""
    assert len(bbox_tuple) == 4
    return (bbox_tuple[1], bbox_tuple[0], bbox_tuple[3], bbox_tuple[2])