Laws throughout the country with regards to flashing your headlights for any purpose while driving your car vary from state to state. In Wyoming, according to Justia US Law, the 2020 Wyoming Statute 31-5-928.c states, “Flashing lights are prohibited except as authorized…” The authorized vehicles are those such as law enforcement, vehicles of municipalities and public service corporations, wreckers, and funeral processions. Even those come with special circumstances.
Given the fact that law enforcement is one of those ‘authorized’ vehicles, I don’t think they will be the ones flashing their lights to tell you there is a speed trap coming up. If they do you flash some sort of lights at you, it’s likely that you have a lot worse problems than just speeding on your hands.