Batched sub-matrix selection

Is it possible to select a batch of sub-matrices with different starting and ending rows and column indices from a matrix? Please check the below example:

# construct a matrix
m = torch.arange(0, 9).view(3, 3)
# define starting and ending indices for each batch
start_row = torch.tensor([[0,0], [1, 0]])
end_row = torch.tensor([[1, 1], [2, 1]])
start_col = torch.tensor([[0,0], [0,0]])
end_col = torch.tensor([[1,1], [1,1]])
# selecting sub-matrices
print(m[start_row:end_row, start_col:end_col])

Looks like advanced indexing. I bet converting this to numpy and asking on stackoverflow will get answers fast, numpy questions usually get answered pretty fast.