Modifying/Deleting points of an IPO curve (Blender 2.28a)

I don’t understand how you can edit or delete the points of an IPO curve with the new API. And how you link the modified curve to an object.
This is to be applied to the Insect walk script posted in the script list effort.

Thanks for any code sample

Laurent