code: def index_search(right_eigenvectors):
      
  
      num_micro, num_eigen = right_eigenvectors.shape
  
      index = np.zeros(num_eigen, 'int')
  
      # first vertex: row with largest norm
      index[0] = np.argmax(
              [norm(right_eigenvectors[i]) for i in range(num_micro)])
  
      ortho_sys = right_eigenvectors - np.outer(np.ones(num_micro),
                                                right_eigenvectors[index[0]])
  
      for j in range(1, num_eigen):
          temp = ortho_sys[index[j - 1]].copy()
          for l in range(num_micro):
              ortho_sys[l] -= temp * dot(ortho_sys[l], temp)
  
          dist_list = np.array([norm(ortho_sys[l]) for l in range(num_micro)])
  
          index[j] = np.argmax(dist_list)
  
          ortho_sys /= dist_list.max()
  
      return index
docs: Find simplex structure in eigenvectors to begin PCCA+.
  
  
      Parameters
      ----------
      right_eigenvectors :  ndarray
          Right eigenvectors of transition matrix
  
      Returns
      -------
      index : ndarray
          Indices of simplex