human
I wrote the below code

    cache = obj.cache = {}
    def memoizer(*args, **kwargs):
        key = (obj, args, frozenset(kwargs.items()))
        try:
            result = cache[key]
        except (TypeError, ValueError):
            return obj(*args, **kwargs)
        except KeyError:
            result = obj(*args, **kwargs)
            if (result is not None):
                cache[key] = obj(*args, **kwargs)
            return result
        else:
            return result
    return memoizer

What's a good function header?

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

def memoize_faked(obj):