def get_sub_grid(grid, row_index, col_index, split):
    """Get sub_grid from grid containing split numbers of rows and cols."""
    return [row[col_index * split:(col_index + 1) * split]
            for row in grid[row_index * split:(row_index + 1) * split]]