human
I wrote the below code

    def invoke_func(*args, **kwargs):
        from twisted.python.threadable import isInIOThread
        from traceback import print_stack
        if isInIOThread():
            import inspect
            caller = inspect.stack()[1]
            callerstr = ('%s    %s:%s' % (caller[3], caller[1], caller[2]))
            from time import time
            logger.error('%d    CANNOT    BE    ON    DISPERSYTHREAD    %s    %s:%s    called    by    %s', long(time()), func.__name__, func.func_code.co_filename, func.func_code.co_firstlineno, callerstr)
            print_stack()
        return func(*args, **kwargs)
    invoke_func.__name__ = func.__name__
    return invoke_func

What's a good function header?
assistant
#Here's a good function header.

def warnIfDispersyThread(func):