I'm only guessing but looks like transformer for the inexpensive sets 70's - 90's you didn't give a great pic of it. trying to determine if the black cord is a plug to plug into a outlet either way with the forward reverse switch it's for a DC train set of some type.