def reduce_size(self, size):
        if self.total_sockets <= size:
            return
        num_culling = self.total_sockets - size
        culled = sorted([(v, k) for k,v in self.sock_idle_times.iteritems()])[-num_culling:]
        self.total_sockets -= num_culling
        return [self._remove_sock(e[1]) for e in culled]
reduce to the specified size by killing the oldest sockets
dataset/ETHPy150Open paypal/support/support/socket_pool.py/SocketPool.reduce_size