human
I wrote the below code

    if (_EXCEPTION_REGISTRY.get((code, sub_code)) is not None):
        raise ValueError(('BGPSException    with    code    %d    and    sub-code    %d    already    defined.' % (code, sub_code)))
    def decorator(subclass):
        'Sets    class    constants    for    exception    code    and    sub-code.\n\n                                If    given    class    is    sub-class    of    BGPSException    we    sets    class    constants.\n                                '
        if issubclass(subclass, BGPSException):
            _EXCEPTION_REGISTRY[(code, sub_code)] = subclass
            subclass.CODE = code
            subclass.SUB_CODE = sub_code
            subclass.DEF_DESC = def_desc
        return subclass
    return decorator

What's a good function header?

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

def add_bgp_error_metadata(code, sub_code, def_desc='unknown'):