def require_student_from_identifier(unique_student_identifier):
 try:
  return get_student_from_identifier(unique_student_identifier)
 except User.DoesNotExist:
  raise DashboardError(_('Could not find student matching identifier: {student_identifier}').format(student_identifier=unique_student_identifier))

def require_student_from_identifier ( unique_student_identifier ) : try : return get_student_from_identifier ( unique_student_identifier ) except User . DoesNotExist : raise DashboardError ( _ ( 'Could not find student matching identifier: {student_identifier}' ) . format ( student_identifier = unique_student_identifier ) )
same as get_student_from_identifier() but will raise a dashboarderror if the student does not exist .