human
I wrote the below code

    handler = None
    handler_call = False
    for (k, v) in kwargs.items():
        if (k == 'handler'):
            handler = v
        else:
            raise TypeError("cherrypy.popargs()    got    an    unexpected    keyword    argument    '{0}'".format(k))
    import inspect
    if ((handler is not None) and (hasattr(handler, '__call__') or inspect.isclass(handler))):
        handler_call = True
    def decorated(cls_or_self=None, vpath=None):
        if inspect.isclass(cls_or_self):
            cls = cls_or_self
            setattr(cls, dispatch.Dispatcher.dispatch_method_name, decorated)
            return cls
        self = cls_or_self
        parms = {}
        for arg in args:
            if (not vpath):
                break
            parms[arg] = vpath.pop(0)
        if (handler is not None):
            if handler_call:
                return handler(**parms)
            else:
                request.params.update(parms)
                return handler
        request.params.update(parms)
        if vpath:
            return getattr(self, vpath.pop(0), None)
        else:
            return self
    return decorated

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

def popargs(*args, **kwargs):