def _update_hroi_labels(hrois, new_labels):
    """Update the labels of the hroisusing new_labels"""
    for subject in range(len(hrois)):
        if hrois[subject].k > 0:
            us = hrois[subject].get_roi_feature('label')
            us[us > -1] = new_labels[us[us > -1]]
            hrois[subject].set_roi_feature('label', us)
