'Find history objects across multiple backend stores for a given StudentModule'

@staticmethod
def get_history(student_modules):

    history_entries = []
    if settings.FEATURES.get('ENABLE_CSMH_EXTENDED'):
        history_entries += coursewarehistoryextended.models.StudentModuleHistoryExtended.objects.filter(student_module__in=[module.id for module in student_modules]).order_by('-id')
    if settings.FEATURES.get('ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES'):
        history_entries += StudentModuleHistory.objects.prefetch_related('student_module').filter(student_module__in=student_modules).order_by('-id')
    return history_entries
