def _get_and_validate_course(course_key_string, user):
 course_key = CourseKey.from_string(course_key_string)
 course = get_course_and_check_access(course_key, user)
 if (settings.FEATURES['ENABLE_VIDEO_UPLOAD_PIPELINE'] and getattr(settings, 'VIDEO_UPLOAD_PIPELINE', None) and course and course.video_pipeline_configured):
  return course
 else:
  return None

def _get_and_validate_course ( course_key_string , user ) : course_key = CourseKey . from_string ( course_key_string ) course = get_course_and_check_access ( course_key , user ) if ( settings . FEATURES [ 'ENABLE_VIDEO_UPLOAD_PIPELINE' ] and getattr ( settings , 'VIDEO_UPLOAD_PIPELINE' , None ) and course and course . video_pipeline_configured ) : return course else : return None
given a course key .