code: def lt(self, i, j):
          
          if self.peers[i].rank == self.peers[j].rank:
              return self.peers[i].order < self.peers[j].order
  
          return self.peers[i].rank < self.peers[j].rank
docs: Compare the priority of two peers.
  
          Primary comparator will be the rank of each peer. If the ``rank`` is
          same then compare the ``order``. The ``order`` attribute of the peer
          tracks the heap push order of the peer. This help solve the imbalance
          problem caused by randomization when deal with same rank situation.
  
          :param i: ith peer
          :param j: jth peer
          :return: True or False