human
I wrote the below code

    def decorate(method):
        get_args = [_arg_mapping[x] for x in args]
        @wraps(method)
        def wrapper(self, byte):
            if ((state is not None) and (self.state != state)):
                raise ValueError(u'state    precondition    failed')
            return method(self, *[f(self, (byte - min)) for f in get_args])
        if (max is None):
            table[min] = wrapper
        else:
            for i in xrange(min, (max + 1)):
                assert (table[i] is None)
                table[i] = wrapper
        return wrapper
    return decorate

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

def _dispatch(table, min, max=None, state=None, args=(u'raw',)):