You call this in L23. I suggest refactoring this code to avoid duplicated code, and to improve readability, in the following manner:

```
if course_slug is None:
    return False

if (course_slug.endswith('_') and course_wiki_slug_is_numerical(course_slug[:-1]):
    course_slug = course_slug[:-1]

if user_is_staff_on_course_number(user, course_slug):
    return True
return False
```