Notwithstanding any law to the contrary, whenever an engineer of a railroad locomotive is required to show proof of identity under this title, in connection with operation of the locomotive, to any law enforcement officer, the engineer shall not be required to display an operator's or chauffeur's license, or driver license, but shall display an engineer's operator permit instead.