code: def scoped_connection(func):
    '''
    Decorator that gives out connections.
    '''
    def _with(series, *args, **kwargs):
      connection = None
      try:
        connection = series._connection()
        return func(series, connection, *args, **kwargs)
      finally:
        series._return( connection )
    return _witf scoped_connection(func):
    '''
    Decorator that gives out connections.
    '''
    def _with(series, *args, **kwargs):
      connection = None
      try:
        connection = series._connection()
        return func(series, connection, *args, **kwargs)
      finally:
        series._return( connection )
    return _with
docs: Decorator that gives out connections.