C/C++ code to python

Hello,I wonder if it’s possible to convert this code snippet to python and use it in blender
I don’t know C/C++ that much so any help in that i will appreciate it .

Snippet

bool MeshImporter::is_flat_face(unsigned int *nind, COLLADAFW::MeshVertexData& nor, int count)
{
float a[3], b[3];

get_vector(a, nor, *nind, 3);
normalize_v3(a);

nind++;

for (int i = 1; i < count; i++, nind++) {
	get_vector(b, nor, *nind, 3);
	normalize_v3(b);

	float dp = dot_v3v3(a, b);

	if (dp < 0.99999f || dp > 1.00001f)
		return false;
}

return true;

}

This snippet is the blender collada export/import “https://github.com/dfelinto/blender/blob/master/source/blender/collada/MeshImporter.cpp
Line 837-857
Thanks.