code: def _get_server(self):
          
          with self._lock:
              inactive_server_count = len(self._inactive_servers)
              for i in range(inactive_server_count):
                  try:
                      ts, server, message = heapq.heappop(self._inactive_servers)
                  except IndexError:
                      pass
                  else:
                      if (ts + self.retry_interval) > time():
                          # Not yet, put it back
                          heapq.heappush(self._inactive_servers,
                                         (ts, server, message))
                      else:
                          self._active_servers.append(server)
                          logger.warn("Restored server %s into active pool",
                                      server)
  
              # if none is old enough, use oldest
              if not self._active_servers:
                  ts, server, message = heapq.heappop(self._inactive_servers)
                  self._active_servers.append(server)
                  logger.info("Restored server %s into active pool", server)
  
              server = self._active_servers[0]
              self._roundrobin()
  
              return server
docs: Get server to use for request.
          Also process inactive server list, re-add them after given interval.