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

    cache = {'timeout': timeout}
    def decorator(func):
        def wrapper(*args, **kwargs):
            start = time()
            if ((not ('time' in cache)) or ((start - cache['time']) > cache['timeout'])):
                cache['result'] = func(*args, **kwargs)
                cache['time'] = time()
                if (dynamic_timeout and ((cache['time'] - start) > cache['timeout'])):
                    cache['timeout'] *= 2
            return cache['result']
        def clear_cache():
            if ('time' in cache):
                del cache['time']
            if ('result' in cache):
                del cache['result']
        wrapper.clear_cache = clear_cache
        return wrapper
    return decorator

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

def memoize(timeout, dynamic_timeout=False):