How do I get the rank from torch.lstsq?

in numpy the numpy.linalg.lstsq(a,b) returns 4 values which are solution, residuals, rank and singulare values of a .ref. However Pytorch version retuns only a tuple of Solution and QR.
How am I supposed to get the ranks here? I’m lost here!

Any help is greatly apprecaited.