def METHOD_NAME(self, obj):
    """
    Retrieve course modes associated with the course.
    """
    course_modes = CourseMode.modes_for_course(
        obj.id,
        include_expired=self.include_expired,
        only_selectable=False
    )
    return [
        ModeSerializer(mode).data
        for mode in course_modes
    ]