The attorney for the municipality commencing the proceedings has the right to withdraw said proceedings or to dismiss the same as to one or more of said defendants or as to one or more parcels of property, without prejudice, at any stage of the proceedings, and the petitioner shall pay the costs thereof.