(4)???Whenever it becomes necessary to open a railway right-of-way in order to permit cleaning out or repairing any district drain, the board shall ascertain the reasonable cost thereof and, except as otherwise provided in sub. (3), shall award such cost as damages to the railway company in the board's report when assessing the cost of repairs.