human
I wrote the below code

    def _expect_element(collection):
        if isinstance(collection, (set, frozenset)):
            collection_for_error_message = tuple(sorted(collection))
        else:
            collection_for_error_message = collection
        template = "%(funcname)s()    expected    a    value    in    {collection}    for    argument    '%(argname)s',    but    got    %(actual)s    instead.".format(collection=collection_for_error_message)
        return make_check(ValueError, template, complement(op.contains(collection)), repr, funcname=__funcname)
    return preprocess(**valmap(_expect_element, named))

What's a good function header?

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

def expect_element(__funcname=_qualified_name, **named):