human
I wrote the below code

    cache = {}
    @wraps(func)
    def memoizer(op_tree, be, next_error=None):
        "\n                                If    params    in    the    caches,    return    results    directly.    Othewise,    add    to    cache\n                                and    return    the    results.\n\n                                Arguments:\n                                                op_tree    (OpTreeNode):    the    op-tree    to    supply    to    the    func.\n                                                be    (Backend):    computation    backend    to    supply    to    the    func.\n                                                next_error    (Tensor    or    OpTreeNode,    optional):    next    layer's    error    to\n                                                                                                                                                                                                                                    supply    to    the    func.\n                                "
        key = (op_tree.key(), be, next_error)
        if (key not in cache):
            cache[key] = func(op_tree, be, next_error)
        return cache[key]
    return memoizer

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

def memoize_autodiff(func):