question: public List < TextUnitDTOWithComments > enrichTextUnitDTOsWithComments ( List < TextUnitDTO > textUnitDTOs ) { int BATCH_SIZE = 500 ; List < TextUnitDTOWithComments > textUnitDTOsWithComments = new ArrayList < > ( ) ; List < TextUnitDTO > textUnitDTOsForBatch = new ArrayList < > ( ) ; List < Long > tmTextUnitVariantIdsForBatch = new ArrayList < > ( ) ; int count = 1 ; for ( TextUnitDTO textUnitDTO : textUnitDTOs ) { Long tmTextUnitVariantId = textUnitDTO . getTmTextUnitVariantId ( ) ; textUnitDTOsForBatch . add ( textUnitDTO ) ; tmTextUnitVariantIdsForBatch . add ( tmTextUnitVariantId ) ; if ( count % BATCH_SIZE == 0 ) { processTextUnitDTOsBatch ( textUnitDTOsWithComments , textUnitDTOsForBatch , tmTextUnitVariantIdsForBatch ) ; textUnitDTOsForBatch = new ArrayList < > ( ) ; tmTextUnitVariantIdsForBatch = new ArrayList < > ( ) ; } } processTextUnitDTOsBatch ( textUnitDTOsWithComments , textUnitDTOsForBatch , tmTextUnitVariantIdsForBatch ) ; return textUnitDTOsWithComments ; }
target:  Adds variant comments associated to the given TextUnitDTOs. It processes the TextUnitDTOs by batch (500 at a time) to reduce the number of queries needed.