'Return a DBAPI connection from the pool.
The connection is instrumented such that when its
``close()`` method is called, the connection will be returned to
the pool.'

def connect(self):

    if (not self._use_threadlocal):
        return _ConnectionFairy._checkout(self)
    try:
        rec = self._threadconns.current()
    except AttributeError:
        pass
    else:
        if (rec is not None):
            return rec._checkout_existing()
    return _ConnectionFairy._checkout(self, self._threadconns)
