human
I wrote the below code

    def _memoize(fun):
        mutex = threading.Lock()
        cache = Cache(limit=maxsize)
        @wraps(fun)
        def _M(*args, **kwargs):
            if keyfun:
                key = keyfun(args, kwargs)
            else:
                key = ((args + (KEYWORD_MARK,)) + tuple(sorted(kwargs.items())))
            try:
                with mutex:
                    value = cache[key]
            except KeyError:
                value = fun(*args, **kwargs)
                _M.misses += 1
                with mutex:
                    cache[key] = value
            else:
                _M.hits += 1
            return value
        def clear():
            u'Clear    the    cache    and    reset    cache    statistics.'
            cache.clear()
            _M.hits = _M.misses = 0
        _M.hits = _M.misses = 0
        _M.clear = clear
        _M.original_func = fun
        return _M
    return _memoize

What's a good function header?

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

def memoize(maxsize=None, keyfun=None, Cache=LRUCache):