<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def next_batch(self, _):
        "Handler for 'Next Batch' button click. Delete all flagged images and renders next batch."
        for img_widget, delete_btn, fp, in self._batch:
            fp = delete_btn.file_path
            if (delete_btn.flagged_for_delete == True):
                self.delete_image(fp)
                self._deleted_fns.append(fp)
        self._all_images = self._all_images[self._batch_size:]
        self.empty_batch()
        self.render()