def METHOD_NAME(self, X):
    # MSIWarp discards peaks outside the node_mzs range, so add a safety margin at either end
    # in case some other spectra in the dataset have a wider m/z range than the sample spectra.
    # Also, round to the nearest 10 or 1 Da for consistency and interpretability, and only pick
    # unique values in case n_segments is too high or the mass range is too small
    min_mz = np.floor(X.mz.min() / 10 - 1) * 10
    max_mz = np.ceil(X.mz.max() / 10 + 1) * 10
    node_mzs = np.unique(np.round(np.linspace(min_mz, max_mz, self.n_segments + 1)))
    node_slacks = peak_width(node_mzs, self.analyzer, self.recal_sigma_1) / 2
    return mx.initialize_nodes(node_mzs, node_slacks, self.n_steps)