Split get_courses_for_wiki impl

LMS-2914
`master_branch` was not added to the docstring either; any suggestions on what to say for that?