Small doorbell transformer with a brown plastic cover.
Mains power connects at the top, and one of three lower voltages is available from the bottom terminals. In this case, 8 volts was selected.
The top terminal holes have been shoddily sealed using some R391 compound, which also has another less pleasant two word name, the first word being dog.
This example was screwed directly to a wall, and showed signs of overheating, as there were black soot marks extending for several inches above the transformer.