code: def _normalize_eigensystem(u, lv, rv):
      
      # first normalize the stationary distribution separately
      lv[:, 0] = lv[:, 0] / np.sum(lv[:, 0])
  
      for i in range(1, lv.shape[1]):
          # the remaining left eigenvectors to satisfy
          # <\phi_i, \phi_i>_{\mu^{-1}} = 1
          lv[:, i] = lv[:, i] / np.sqrt(np.dot(lv[:, i], lv[:, i] / lv[:, 0]))
  
      for i in range(rv.shape[1]):
          # the right eigenvectors to satisfy <\phi_i, \psi_j> = \delta_{ij}
          rv[:, i] = rv[:, i] / np.dot(lv[:, i], rv[:, i])
  
      return u, lv, rv
docs: Normalize the eigenvectors of a reversible Markov state model according
      to our preferred scheme.