'Returns course summaries on the Draft or Published branch depending on the branch setting.'

def get_course_summaries(self, **kwargs):

    branch_setting = self.get_branch_setting()
    if (branch_setting == ModuleStoreEnum.Branch.draft_preferred):
        return super(DraftVersioningModuleStore, self).get_course_summaries(ModuleStoreEnum.BranchName.draft, **kwargs)
    elif (branch_setting == ModuleStoreEnum.Branch.published_only):
        return super(DraftVersioningModuleStore, self).get_course_summaries(ModuleStoreEnum.BranchName.published, **kwargs)
    else:
        raise InsufficientSpecificationError()
