'Check if a user is enrolled in a course.
A user is considered to be enrolled in a course if
they\'re enrolled in any of the nested course runs.
Arguments:
course (dict): Containing nested course runs.
Returns:
bool, indicating whether the course is in progress.'

def _is_course_enrolled(self, course):

    return any(((course_run['key'] in self.course_run_ids) for course_run in course['course_runs']))
