code: def _validate_and_parse_course_key(self, course_key):
          
          try:
              return CourseKey.from_string(course_key)
          except InvalidKeyError:
              raise ValidationError(_("Invalid course key: {}").format(course_key))
docs: Returns a validated parsed CourseKey deserialized from the given course_key.