I would say it is some kind of transformer but it has the same wire girth on both primary and secondary windings and the same loops count.
It had the following label:
CLTE 250V, 0.5 A, 45 U, 2 × 500 uH
I need to know what it does. It is located between a capacitor and contacts that close the circuit
It is part of a Pfaff 92 sewing machine pedal. Right between what looks like a capacitor / a group of them and contacts that gradually touch themselves and (with the help of some resistors, I guess) send current of different values to the motor (or maybe they do something else).
This little thing (the size of an AAA battery) had a short and I would like to replace or wrap new wire. That is what I need to know what it is before