Tuning the Optoelectronic Properties of Pyridine‐Containing Polymers for Light‐Emitting Devices