import torch
from typing import Tuple


def get_idxs_tuple(idxs: torch.Tensor
                   ) -> Tuple[torch.Tensor, ...]:
    """
    @param idxs - Shape (num indices, num dimensions that the indices index into).
    @returns - A tuple, which can be directly used to index into a tensor, eg tensor[idxs_tuple].
        The tuple has (num dimensions that the indices index into) tensors, where each tensor has
        (num indices) elements.
    """
    return tuple(torch.transpose(idxs, 0, 1))