code: def _censor_signals(signals, confounds, sample_mask):
      """Apply sample masks to data."""
      signals = signals[sample_mask, :]
      if confounds is not None:
          confounds = confounds[sample_mask, :]
      return signals, confounds
  
imports: import warnings
  import numpy
  import pandas
  from scipy import linalg, signal
  from scipy.interpolate import CubicSpline
  from sklearn.utils import as_float_array, gen_even_slices
  from nilearn._utils import fill_doc, stringify_path
  from nilearn._utils.numpy_conversions import as_ndarray, csv_to_array
  from nilearn._utils.param_validation import check_run_sample_masks
label_desc: Use image node_id 11 for calling a global function with example usage: _censor_signals(signals, confounds, sample_mask) and returns: signals,  confounds