Answer:
The role of a commutator in a electric generator is a rotary switch (in certain types of electrical generators that periodically reverse the current direction between the rotor and the external circuit by that reversing it in the current direction teb rotating windings all half turn a force called torque is produced)