human
I wrote the below code

    def _recurse(o, dct, depth):
        if (0 <= max_depth < depth):
            return
        for ref in get_referents(o):
            idr = id(ref)
            if (idr not in dct):
                dct[idr] = (ref, getsizeof(ref, default=0))
                _recurse(ref, dct, (depth + 1))
    sizedict = {}
    _recurse(obj, sizedict, 0)
    size = (getsizeof(obj) + sum([p[1] for p in sizedict.values()]))
    return size

What's a good function header?

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

def deepsize(obj, max_depth=4):