Wait until a client instance is available
        :param float initial_timeout:
          how long to wait initially for an existing client to complete
        :param float next_timeout:
          if the pool could not obtain a client during the initial timeout,
          and we have allocated the maximum available number of clients, wait
          this long until we can retrieve another one

        :return: A connection object

def get_client(self, initial_timeout=0.1, next_timeout=30):
        """
        Wait until a client instance is available
        :param float initial_timeout:
          how long to wait initially for an existing client to complete
        :param float next_timeout:
          if the pool could not obtain a client during the initial timeout,
          and we have allocated the maximum available number of clients, wait
          this long until we can retrieve another one

        :return: A connection object
        """
        try:
            return self._test_client(self._q.get(True, initial_timeout))
        except Empty:
            try:
                self._lock.acquire()
                if self._clients_in_use >= self._max_clients:
                    raise _ClientUnavailableError("Too many clients in use")
                return self._test_client(self._make_client())
            except NetworkError:
                if not self._tolerate_error:
                    raise
            except _ClientUnavailableError as e:
                try:
                    return self._test_client(self._q.get(True, next_timeout))
                except Empty:
                    raise e
            finally:
                self._lock.release()