Remove points from cells or convert cell types

I need to remove via python script midedge points from cells of quadratic types, because they contain wrong data. In other words to convert a quadratic cell type to a corresponding linear cell type (for example, to go from vtk_quadratic_tetra to vtk_tetra).

P.S. Threshold filter will not work here.

Could anyone suggest a way around?