#NEWLINE# def _get_connection( ) : #NEWLINE# #INDENT# '\n    Global function to access the couchbase connection (and make it if its closed)\n    ' #NEWLINE# global COUCHBASE_CONN #NEWLINE# if ( COUCHBASE_CONN is None ) : #NEWLINE# #INDENT# opts = _get_options ( ) #NEWLINE# COUCHBASE_CONN = couchbase . Couchbase . connect ( host = opts [ 'host' ] , port = opts [ 'port' ] , bucket = opts [ 'bucket' ] ) #NEWLINE# #UNINDENT# return COUCHBASE_CONN