torch.sort
torch.sort(input, dim=- 1, descending=False, stable=False, *, out=None)
Sorts the elements of the "input" tensor along a given dimension in
   ascending order by value.
If "dim" is not given, the last dimension of the input is chosen.
If "descending" is "True" then the elements are sorted in
   descending order by value.
If "stable" is "True" then the sorting routine becomes stable,
   preserving the order of equivalent elements.
A namedtuple of (values, indices) is returned, where the values
   are the sorted values and indices are the indices of the elements
   in the original input tensor.
Parameters:
      * input (Tensor) -- the input tensor.
  * **dim** (*int**, **optional*) -- the dimension to sort along

  * **descending** (*bool**, **optional*) -- controls the sorting
    order (ascending or descending)

  * **stable** (*bool**, **optional*) -- makes the sorting routine
