code: 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)
  
file_path: nipy/nipy/labs/spatial_models/bayesian_structural_analysis.py
imports: import numpy
  import scipy.stats
  from nipy.algorithms.graph import wgraph_from_coo_matrix
  from ...algorithms.statistics.empirical_pvalue import NormalEmpiricalNull, gamma_gaussian_fit, three_classes_GMM_fit
  from .hroi import HROI_as_discrete_domain_blobs
  from .structural_bfls import build_landmarks
label_desc: Use image node_id 4 for calling a global function with example usage: _update_hroi_labels(hrois, new_labels) without return types