human
I wrote the below code

    @wraps(view_func)
    def inner(request, course_id, *args, **kwargs):
        '\n                                Redirect    to    the    consent    page    if    the    request.user    must    consent    to    data    sharing    before    viewing    course_id.\n\n                                Otherwise,    just    call    the    wrapped    view    function.\n                                '
        consent_url = get_enterprise_consent_url(request, course_id)
        if consent_url:
            real_user = getattr(request.user, 'real_user', request.user)
            LOGGER.warning(u'User    %s    cannot    access    the    course    %s    because    they    have    not    granted    consent', real_user, course_id)
            return redirect(consent_url)
        return view_func(request, course_id, *args, **kwargs)
    return inner

What's a good function header?

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

def data_sharing_consent_required(view_func):