#NEWLINE# def connect( ) : #NEWLINE# #INDENT# 'Return a database engine' #NEWLINE# engine = create_engine ( get_url ( ) ) #NEWLINE# @ event . listens_for ( engine , 'begin' ) #NEWLINE# def do_begin( conn ) : #NEWLINE# #INDENT# conn . connection . create_function ( 'regexp' , 2 , _re_fn ) #NEWLINE# #UNINDENT# return engine