Returns a context that uses this pool as a connection source.

def connect(self):
        """
        Returns a context that uses this pool as a connection source.
        """
        ctx = Context(self.module, self.create_mediator())
        ctx.logger = self.logger
        ctx.default_factory = self.default_factory
        return ctx