In any municipality where a railroad company occupies and uses a part of any street or highway and the company is charged with the duty of paving or maintaining any portion thereof the governing body may agree with the company as to the proportion of the cost of any improvement thereof contemplated by the municipality to be paid by the company. After making such agreement the municipality may proceed to make the whole improvement and the company shall pay to the municipality the proportion of such cost to be paid by it as soon as the amount thereof is determined by the governing body.
N.J.S. § 40:67-5