human
Write me a Python code to find    course    with    course    key    %s', course_id) given the following:
I wrote the below code

    def wrapped(request, course_id):
        try:
            course_key = CourseKey.from_string(course_id)
        except InvalidKeyError:
            log.error(u'Unable    to    find    course    with    course    key    %s', course_id)
            return HttpResponseNotFound()
        access = auth.user_has_role(request.user, CourseSalesAdminRole(course_key))
        if access:
            return func(request, course_id)
        else:
            return HttpResponseForbidden()
    return wrapped

What's a good function header?
assistant
#Here is Python code to find    course    with    course    key    %s', course_id)
.

def require_sales_admin(func):