human
I wrote the below code

    @wraps(func)
    def inner(request, *args, **kwargs):
        "\n                                Check    for    a    TPA    hint    in    combination    with    a    logged    in    user,    and    log    the    user    out\n                                if    the    hinted    provider    specifies    that    they    should    be,    and    if    they    haven't    already\n                                been    redirected    to    a    logout    by    this    decorator.\n                                "
        sso_provider = None
        provider_id = request.GET.get('tpa_hint')
        decorator_already_processed = (request.GET.get('session_cleared') == 'yes')
        if (provider_id and (not decorator_already_processed)):
            if (request.user and request.user.is_authenticated()):
                try:
                    sso_provider = Registry.get(provider_id=provider_id)
                except ValueError:
                    sso_provider = None
        if (sso_provider and sso_provider.drop_existing_session):
            return redirect('{}?{}'.format(request.build_absolute_uri(reverse('logout')), urlencode({'redirect_url': '{}?{}'.format(request.path, urlencode([('tpa_hint', provider_id), ('session_cleared', 'yes')]))})))
        else:
            return func(request, *args, **kwargs)
    return inner

What's a good function header?

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

def tpa_hint_ends_existing_session(func):