code: def _volume_calculations(self, percentiles):
      for i in range(self._data.shape[-1]):
          vol_data = self._data[..., i]
          self._int_range = np.percentile(vol_data, percentiles)
          if np.sum(np.diff(self._int_range)) != 0:
              break
          else:
              if i < self._data_shape[-1] - 1:
                  warnings.warn(
                      f"Volume N°{i} does not have any contrast. "
                      "Please, check the value ranges of your data. "
                      "Moving to the next volume."
                  )
              else:
                  _evaluate_intensities_range(self._int_range)
      return vol_data
  
imports: import warnings
  import numpy
  from scipy import stats
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 2 for calling the SlicesVisualizer obj's underlying member method code with example usage: obj._volume_calculations(percentiles) and returns: vol_data