human
I wrote the below code

    def _1(function):
        def _2(*args, **kw):
            class Dispatch(threading.Thread, ):
                def __init__(self):
                    threading.Thread.__init__(self)
                    self.result = None
                    self.error = None
                    self.setDaemon(True)
                    self.start()
                def run(self):
                    try:
                        self.result = function(*args, **kw)
                    except:
                        self.error = sys.exc_info()
            c = Dispatch()
            c.join(timeout)
            if c.isAlive():
                raise RuntimeError('took    too    long')
            if c.error:
                raise c.error[1]
            return c.result
        return _2
    return _1

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

def timelimit(timeout):