#NEWLINE# def patch_function_list( functions , action_type , format_string ) : #NEWLINE# #INDENT# for ( i , func ) in enumerate ( functions ) : #NEWLINE# #INDENT# if hasattr ( info , 'im_class' ) : #NEWLINE# #INDENT# middleware_name = func . im_class . __name__ #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# middleware_name = func . __name__ #NEWLINE# #UNINDENT# info = ( action_type , ( format_string % ( middleware_name , ) ) , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# functions [ i ] = trace_function ( func , info )