def settrace(func):
global _trace_hook<EOL>_trace_hook = func<EOL>
Set a trace function for all threads started from the threading module.

    The func will be passed to sys.settrace() for each thread, before its run()
    method is called.