code: def get_rank(self, peer):
          
          if not peer.connections:
              return self.TIERS[0]
  
          if not peer.has_incoming_connections:
              return self.TIERS[1] + peer.total_outbound_pendings
  
          return self.TIERS[2] + peer.total_outbound_pendings
docs: Calculate the peer rank based on connections.
  
          If the peer has no incoming connections, it will have largest rank.
          In our peer selection strategy, the largest number has least priority
          in the heap.
  
          If the peer has incoming connections, we will return number of outbound
          pending requests and responses.
  
          :param peer: instance of `tchannel.tornado.peer.Peer`
          :return: rank of the peer