def use_conn_pool(func):
 def wrapper(self, *args, **kwargs):
  with self._get_pool_connection() as conn:
   self._apply_options(conn)
   return func(self, conn, *args, **kwargs)
 return wrapper

def use_conn_pool ( func ) : def wrapper ( self , * args , ** kwargs ) : with self . _get_pool_connection ( ) as conn : self . _apply_options ( conn ) return func ( self , conn , * args , ** kwargs ) return wrapper
use this only for connection pool specific ldap api .