def remove_all_instructors(course_key):
 staff_role = CourseStaffRole(course_key)
 staff_role.remove_users(*staff_role.users_with_role())
 instructor_role = CourseInstructorRole(course_key)
 instructor_role.remove_users(*instructor_role.users_with_role())

def remove_all_instructors ( course_key ) : staff_role = CourseStaffRole ( course_key ) staff_role . remove_users ( * staff_role . users_with_role ( ) ) instructor_role = CourseInstructorRole ( course_key ) instructor_role . remove_users ( * instructor_role . users_with_role ( ) )
removes all instructor and staff users from the given course .