human
I wrote the below code

    def decorating_function(user_function):
        cache = dict()
        stats = [0, 0]
        (HITS, MISSES) = (0, 1)
        make_key = _make_key
        cache_get = cache.get
        _len = len
        lock = RLock()
        root = []
        root[:] = [root, root, None, None]
        nonlocal_root = [root]
        (PREV, NEXT, KEY, RESULT) = (0, 1, 2, 3)
        if (maxsize == 0):
            def wrapper(*args, **kwds):
                result = user_function(*args, **kwds)
                stats[MISSES] += 1
                return result
        elif (maxsize is None):
            def wrapper(*args, **kwds):
                key = make_key(args, kwds, typed)
                result = cache_get(key, root)
                if (result is not root):
                    stats[HITS] += 1
                    return result
                result = user_function(*args, **kwds)
                cache[key] = result
                stats[MISSES] += 1
                return result
        else:
            def wrapper(*args, **kwds):
                try:
                    key = (make_key(args, kwds, typed) if (kwds or typed) else args)
                except TypeError:
                    stats[MISSES] += 1
                    return user_function(*args, **kwds)
                with lock:
                    link = cache_get(key)
                    if (link is not None):
                        (root,) = nonlocal_root
                        (link_prev, link_next, key, result) = link
                        link_prev[NEXT] = link_next
                        link_next[PREV] = link_prev
                        last = root[PREV]
                        last[NEXT] = root[PREV] = link
                        link[PREV] = last
                        link[NEXT] = root
                        stats[HITS] += 1
                        return result
                result = user_function(*args, **kwds)
                with lock:
                    (root,) = nonlocal_root
                    if (key in cache):
               ...

What's a good function header?

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

def lru_cache(maxsize=100, typed=False):