human
I wrote the below code

    @functools.wraps(func)
    def inner(*args, **kwargs):
        "\n                                Supported    kwargs:\n                                                remove_version    -    If    True,    calls    'version_agnostic'    on    all    return    values,    including    those    in    lists    and    dicts.\n                                                remove_branch    -    If    True,    calls    'for_branch(None)'    on    all    return    values,    including    those    in    lists    and    dicts.\n                                                Note:    The    'field_decorator'    parameter    passed    to    the    decorated    function    is    a    function    that    honors    the\n                                                values    of    these    kwargs.\n                                "
        rem_vers = kwargs.pop('remove_version', True)
        rem_branch = kwargs.pop('remove_branch', True)
        def strip_key_func(val):
            "\n                                                Strips    the    version    and    branch    information    according    to    the    settings    of    rem_vers    and    rem_branch.\n                                                Recursively    calls    this    function    if    the    given    value    has    a    'location'    attribute.\n                                                "
            retval = val
            if (rem_vers and hasattr(retval, 'version_agnostic')):
                retval = retval.version_agnostic()
            if (rem_branch and hasattr(retval, 'for_branch')):
                retval = retval.for_branch(None)
            for field_name in XMODULE_FIELDS_WITH_USAGE_KEYS:
                if hasattr(retval, field_name):
                    setattr(retval, field_name, strip_key_func(getattr(retval, field_name)))
            return retval
        def strip_key_collection(field_value):
            '\n                                                Calls    strip_key_func    for    each    element    in   ...

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

def strip_key(func):