docs: def svds_descending(M, k):
      '''
      In contrast to MATLAB, numpy's svds() arranges the singular
      values in ascending order. In order to have matching codes,
      we wrap it around by a function which re-sorts the singular
      values and singular vectors.
      Args:
          M: 2D numpy array; the matrix whose SVD is to be computed.
          k: Number of singular values to be computed.
  
      Returns:
          u, s, vt = svds(M, k=k)
      '''
      u, s, vt = svds(M, k=k)
      # reverse columns of u
      u = u[:, ::-1]
      # reverse s
      s = s[::-1]
      # reverse rows of vt
      vt = vt[::-1, :]
      return u, np.diag(s), vt.T