human
Here's a good function header given the following:
I wrote the below code

    @decorator
    def wrap(f, self, request, *args, **kwargs):
        if request.user.is_authenticated():
            ident = request.user.username
        else:
            ident = request.META.get('REMOTE_ADDR', None)
        if hasattr(request, 'throttle_extra'):
            "\n                                                Since    we    want    to    be    able    to    throttle    on    a    per-\n                                                application    basis,    it's    important    that    we    realize\n                                                that    `throttle_extra`    might    be    set    on    the    request\n                                                object.    If    so,    append    the    identifier    name    with    it.\n                                                "
            ident += (':%s' % str(request.throttle_extra))
        if ident:
            "\n                                                Preferrably    we'd    use    incr/decr    here,    since    they're\n                                                atomic    in    memcached,    but    it's    in    django-trunk    so    we\n                                                can't    use    it    yet.    If    someone    sees    this    after    it's    in\n                                                stable,    you    can    change    it    here.\n                                                "
            ident += (':%s' % extra)
            now = time.time()
            (count, expiration) = cache.get(ident, (1, None))
            if (expiration is None):
                expiration = (now + timeout)
            if ((count >= max_requests) and (expiration > now)):
                t = rc.THROTTLED
                wait = int((expiration - now))
                t.content = ('Throttled,    wait    %d    seconds.' % wait)
                t['Retry-After'] = wait
                return t
            cache.set(ident, ((count + 1), expiration), (expiration - now))
        return f(self, request,...

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

def throttle(max_requests, timeout=(60 * 60), extra=''):