Originally, NYC fire alarms, introduced in the 1880s, were indicated by lights mounted on shafts above the alarm itself. However, when cast and wrought iron streetlamps were introduced in 1892 on 5th Avenue and then spread all over the city, someone got the idea to mount the indicators on them. Special brackets were designed to hold them.
This photo, dated 1919, shows one of the original indicator lamps. As a rule, there was a fire alarm, and a lamppost holding an indicator lamp, on every other corner. At first the lamps used clear, red colored glass…
… which was highly reflective.
As time went on, perhaps it was too easy to break the glass, or for cost efficiency, the clear red glass was replaced by a plastic orange sphere thin enough for light to pass through it. The mount remained spherical for decades, until cylinder-shaped ones began to replace them after World War II. The spheres hung tough; the last one I saw was in place in Flushing as late as the mid-1990s.
As lampposts became more streamlined, the Beaux Arts style bracket was replaced by a J-shaped pipe. Ultimately the orange cylinders and pipes were replaced by small “top hat” cylinders mounted on luminaires (the bright yellow lights drowns them out, but cost efficiency trumps everything else).