Rule reminder
NE replaces del/della/dei/degli/delle + noun. Position: before conjugated verb. Quantity follows. In passato prossimo: past participle agrees with noun NE replaces.
'Ho comprato delle torte.' → Correctly replace 'delle torte' with 'ne' in passato prossimo: