code: def _sort_by_norm(evals, evecs):
      
      # norms
      evnorms = np.abs(evals)
      # sort
      I = np.argsort(evnorms)[::-1]
      # permute
      evals2 = evals[I]
      evecs2 = evecs[:, I]
      # done
      return evals2, evecs2
docs: Sorts the eigenvalues and eigenvectors by descending norm of the eigenvalues
  
      Parameters
      ----------
      evals: ndarray(n)
          eigenvalues
      evecs: ndarray(n,n)
          eigenvectors in a column matrix
  
      Returns
      -------
      (evals, evecs) : ndarray(m), ndarray(n,m)
          the sorted eigenvalues and eigenvectors