(a) Any company, corporation, or officer of court or any person operating any line of railroad during the nighttime in this state shall be required to place and maintain sufficient lights during the nighttime on all its main line switches of the line of railroad so operated. Green lights shall indicate main line, and red lights shall indicate side tracks.
(b) Any company, corporation, or officer of court or any person operating any railroad in this state, who shall violate any of the provisions of this section, shall be liable on conviction to a penalty of a fine of not less than twenty-five dollars ($25.00) nor more than one hundred dollars ($100) for each separate offense. The penalty shall be recovered in a civil action in the name of the state.