def set_debug_function(func_cb=debug.print_to_stdout, warnings=True, notices=True, speed=True):
 debug.debug_function = func_cb
 debug.enable_warning = warnings
 debug.enable_notice = notices
 debug.enable_speed = speed

def set_debug_function ( func_cb = debug . print_to_stdout , warnings = True , notices = True , speed = True ) : debug . debug_function = func_cb debug . enable_warning = warnings debug . enable_notice = notices debug . enable_speed = speed
define a callback debug function to get all the debug messages .