Doesn’t it really look quite like it?

From the railroad museum’s website: „M&PP No. 1 is a unique locomotive specially designed to climb steep mountain slopes with grades up to 25 percent. The underside is equipped with a toothed cog wheel. As the wheel turns, it connects to a stationary rack rail in the track, thus helping to pull a train up the mountain or provide braking on the way down.“