#NEWLINE# def activate_profile( test = True ) : #NEWLINE# #INDENT# pr = None #NEWLINE# if test : #NEWLINE# #INDENT# if HAS_CPROFILE : #NEWLINE# #INDENT# pr = cProfile . Profile ( ) #NEWLINE# pr . enable ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# log . error ( 'cProfile is not available on your platform' ) #NEWLINE# #UNINDENT# #UNINDENT# return pr