def _get_connection(self):
    with self._wrapped_conn_lock:
        wrapped_conn = self._wrapped_conn
        if ((not wrapped_conn) or (not self._test_connection(wrapped_conn))):
            wrapped_conn = self._get_new_connection()
    return wrapped_conn
def _get_connection(self):
    with self._wrapped_conn_lock:
        wrapped_conn = self._wrapped_conn
        if ((not wrapped_conn) or (not self._test_connection(wrapped_conn))):
            wrapped_conn = self._get_new_connection()
    return wrapped_conn