'Internal generator for fetching lists of courses without loading them.'

def _get_course_blocks_for_branch(self, branch, **kwargs):

    (version_guids, id_version_map) = self.collect_ids_from_matching_indexes(branch, **kwargs)
    if (not version_guids):
        return
    for entry in self.find_course_blocks_by_id(version_guids):
        for course_index in id_version_map[entry['_id']]:
            (yield (entry, course_index))
