def get_masquerade_role(user, course_key):
 course_masquerade = get_course_masquerade(user, course_key)
 return (course_masquerade.role if course_masquerade else None)

def get_masquerade_role ( user , course_key ) : course_masquerade = get_course_masquerade ( user , course_key ) return ( course_masquerade . role if course_masquerade else None )
returns the role that the user is masquerading as .