remove vertex from spline without altering

Hello,

could someone help me with a little script that
removes a selected vertex from a spline without or slightly altering the splines shape

would be nice
thank you