code: def test_handle_scrubbed_volumes():
      """Check interpolation/censoring of signals based on filter type."""
      signals, _, confounds = generate_signals(
          n_features=11, n_confounds=5, length=40
      )
  
      sample_mask = np.arange(signals.shape[0])
      scrub_index = np.array([2, 3, 6, 7, 8, 30, 31, 32])
      sample_mask = np.delete(sample_mask, scrub_index)
  
      (
          interpolated_signals,
          interpolated_confounds,
          sample_mask,
      ) = nisignal._handle_scrubbed_volumes(
          signals, confounds, sample_mask, "butterworth", 2.5, True
      )
      np.testing.assert_equal(
          interpolated_signals[sample_mask, :], signals[sample_mask, :]
      )
      np.testing.assert_equal(
          interpolated_confounds[sample_mask, :],
          confounds[sample_mask, :],
      )
  
      (
          scrubbed_signals,
          scrubbed_confounds,
          sample_mask,
      ) = nisignal._handle_scrubbed_volumes(
          signals, confounds, sample_mask, "cosine", 2.5, True
      )
      np.testing.assert_equal(scrubbed_signals, signals[sample_mask, :])
      np.testing.assert_equal(
          scrubbed_confounds, confounds[sample_mask, :]
      )
  
imports: import os.path
  import numpy
  import pytest
  import scipy.signal
  from pandas import read_csv
  from nilearn import signal
  from nilearn.conftest import _rng
  from nilearn.signal import clean
label_desc: Use image node_id 22 for calling a global function with example usage: test_handle_scrubbed_volumes() without return types