What is the equivalent of this snippet in blender 2.8

This post might help. Basically the vertices_raw way of doing things was removed. You now need separate arrays for faces (indices, start, total)