code: def test_handle_scrubbed_volumes_with_extrapolation():
      """Check interpolation of signals with extrapolation."""
      signals, _, confounds = generate_signals(
          n_features=11, n_confounds=5, length=40
      )
  
      sample_mask = np.arange(signals.shape[0])
      scrub_index = np.concatenate((np.arange(5), [10, 20, 30]))
      sample_mask = np.delete(sample_mask, scrub_index)
  
      # Test cubic spline interpolation (enabled extrapolation) in the
      # very first n=5 samples of generated signal
      extrapolate_warning = (
          "By default the cubic spline interpolator extrapolates "
          "the out-of-bounds censored volumes in the data run. This "
          "can lead to undesired filtered signal results. Starting in "
          "version 0.13, the default strategy will be not to extrapolate "
          "but to discard those volumes at filtering."
      )
      with pytest.warns(FutureWarning, match=extrapolate_warning):
          (
              extrapolated_signals,
              extrapolated_confounds,
              extrapolated_sample_mask,
          ) = nisignal._handle_scrubbed_volumes(
              signals, confounds, sample_mask, "butterworth", 2.5, True
          )
      np.testing.assert_equal(
          signals.shape[0], extrapolated_signals.shape[0]
      )
      np.testing.assert_equal(
          confounds.shape[0], extrapolated_confounds.shape[0]
      )
      np.testing.assert_equal(sample_mask, extrapolated_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 23 for calling a global function with example usage: test_handle_scrubbed_volumes_with_extrapolation() without return types