docs: public static List<AcademicTermDetail> validateAcademicTerms(
              Collection<AcademicTermDetail> academicTerms) {
          final List<AcademicTermDetail> sortedTerms =
                  new ArrayList<AcademicTermDetail>(academicTerms);
          Collections.sort(sortedTerms);
  
          AcademicTermDetail prevTermDetail = null;
          for (final AcademicTermDetail termDetail : sortedTerms) {
              if (prevTermDetail != null) {
                  if (termDetail.getStart().isBefore(prevTermDetail.getEnd())) {
                      throw new IllegalArgumentException(
                              termDetail + " overlaps with " + prevTermDetail);
                  }
              }
  
              prevTermDetail = termDetail;
          }
  
          return sortedTerms;
      }