73 duster speedometer cable question

Hey guys, so bought a 73 duster with 904 trans and 360 engine. Speedometer was all jumpy so I went to replace the cable and noticed something between the cable and the gear at the trans that I don’t know what it is. It’s got a wire coming out of it and was plugged in running who knows where. Here are pictures of the cable and the gear port after I removed it. Any ideas what this thing is!

IMG_0193.jpeg

IMG_0191.jpeg