'Configure course modes and deadlines.'

def _configure(self, mode, upgrade_deadline=None, verification_deadline=None):

    course_mode = CourseModeFactory.create(mode_slug=mode, mode_display_name=mode)
    if (upgrade_deadline is not None):
        course_mode.upgrade_deadline = upgrade_deadline
        course_mode.save()
    VerificationDeadline.set_deadline(self.course.id, verification_deadline)
    return CourseModeForm(instance=course_mode)
