'Returns the non-expired modes for a particular course.
Arguments:
course_id (CourseKey): Search for course modes for this course.
Keyword Arguments:
modes (list of `Mode`): If provided, search through this list
of course modes.  This can be used to avoid an additional
database query if you have already loaded the modes list.
include_expired (bool): If True, expired course modes will be included
in the returned values. If False, these modes will be omitted.
only_selectable (bool): If True, include only modes that are shown
to users on the track selection page.  (Currently, "credit" modes
aren\'t available to users until they complete the course, so
they are hidden in track selection.)
Returns:
dict: Keys are mode slugs, values are lists of `Mode` namedtuples.'

@classmethod
def modes_for_course_dict(cls, course_id, modes=None, **kwargs):

    if (modes is None):
        modes = cls.modes_for_course(course_id, **kwargs)
    return {mode.slug: mode for mode in modes}
