Loading annotations/labels in python for training

I want to load my nii.gz file and corresponding ROI annotations (.csv) in python for training purposes. I am not sure the right way to do that. Can you give me some reference code or documentation on loading annotations? Also, how can I be sure if the annotation is in the right place after loading in? Is there a way to check this?

See specification of markups file formats here.

All the file formats are human-readable and self-describing, so you can just save a markups (point list, line, curve, ROI, …) in Slicer and see what information is saved and how.