code: def deskew(self, reduction_factor=0):
          
          with _LeptonicaErrorTrap():
              return Pix(lept.pixDeskew(self._cdata, reduction_factor))
docs: Returns the deskewed pix object.
  
          A clone of the original is returned when the algorithm cannot find a
          skew angle with sufficient confidence.
  
          reduction_factor -- amount to downsample (0 for default) when searching
              for skew angle