torch.kthvalue
torch.kthvalue(input, k, dim=None, keepdim=False, *, out=None)
Returns a namedtuple "(values, indices)" where "values" is the "k"
   th smallest element of each row of the "input" tensor in the given
   dimension "dim". And "indices" is the index location of each
   element found.
If "dim" is not given, the last dimension of the input is chosen.
If "keepdim" is "True", both the "values" and "indices" tensors are
   the same size as "input", except in the dimension "dim" where they
   are of size 1. Otherwise, "dim" is squeezed (see
   "torch.squeeze()"), resulting in both the "values" and "indices"
   tensors having 1 fewer dimension than the "input" tensor.
Note:
 When "input" is a CUDA tensor and there are multiple valid "k" th
 values, this function may nondeterministically return "indices"
 for any of them.

Parameters:
      * input (Tensor) -- the input tensor.
  * **k** (*int*) -- k for the k-th smallest element
