Train Meets

I have seen train two trains meet on a double track and one will cut his lights off to the other. What is the rule as to who will cut his lights to who? Is this a standard practice that is done on the railroads?

Larry

Ive seen the lights dim when 2 trains pass each other. one cranked his lights back up to warn me about a train coming up from behind. I always leave plenty of room when i take train pictures.
stay safe
joe