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

    protocols = [0, 1, 2, copy.copy, copy.deepcopy]
    if (sys.version_info >= (3,)):
        protocols.extend([3])
    if (sys.version_info >= (3, 4)):
        protocols.extend([4])
    if cloudpickle:
        protocols.extend([cloudpickle])
    for protocol in protocols:
        if (protocol in exclude):
            continue
        if callable(protocol):
            if isinstance(a, BasicMeta):
                continue
            b = protocol(a)
        elif inspect.ismodule(protocol):
            b = protocol.loads(protocol.dumps(a))
        else:
            b = pickle.loads(pickle.dumps(a, protocol))
        d1 = dir(a)
        d2 = dir(b)
        assert (set(d1) == set(d2))
        if (not check_attr):
            continue
        def c(a, b, d):
            for i in d:
                if ((not hasattr(a, i)) or (i in excluded_attrs)):
                    continue
                attr = getattr(a, i)
                if (not hasattr(attr, '__call__')):
                    assert hasattr(b, i), i
                    assert (getattr(b, i) == attr), ('%s    !=    %s' % (getattr(b, i), attr))
        c(a, b, d1)
        c(b, a, d2)

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

def check(a, exclude=[], check_attr=True):