Converts NIML ROI representation in mapping from ROI labels to node indices


roi: list of dictionaries or str

NIML ROIs representation, e.g. from read(), or a filename with ROIs specifications


roi_mapping: dict

A mapping from ROI labels to numpy arrays with node indices


It is assumed that all labels in the rois are unique, otherwise an exception is raised