code: def test_clean_psc(rng):
      n_samples = 500
      n_features = 5
  
      signals, _, _ = generate_signals(
          n_features=n_features, length=n_samples
      )
  
      # positive mean signal
      means = rng.standard_normal((1, n_features))
      signals_pos_mean = signals + means
  
      # a mix of pos and neg mean signal
      signals_mixed_mean = signals + np.append(
          means[:, :-3], -1 * means[:, -3:]
      )
  
      # both types should pass
      for s in [signals_pos_mean, signals_mixed_mean]:
          cleaned_signals = clean(s, standardize="psc", detrend=False)
          np.testing.assert_almost_equal(cleaned_signals.mean(0), 0)
  
          tmp = (s - s.mean(0)) / np.abs(s.mean(0))
          tmp *= 100
          np.testing.assert_almost_equal(cleaned_signals, tmp)
  
          # test with high pass with butterworth
          butterworth_signals = clean(
              s,
              detrend=False,
              filter="butterworth",
              high_pass=0.01,
              tr=2,
              standardize="psc",
          )
          np.testing.assert_almost_equal(butterworth_signals.mean(0), 0)
  
      # leave out the last 3 columns with a mean of zero to test user warning
      signals_w_zero = signals + np.append(
          means[:, :-3], np.zeros((1, 3))
      )
      with pytest.warns(UserWarning) as records:
          cleaned_w_zero = clean(signals_w_zero, standardize="psc")
      psc_warning = sum(
          "psc standardization strategy" in str(r.message)
          for r in records
      )
      assert psc_warning == 1
      np.testing.assert_equal(cleaned_w_zero[:, -3:].mean(0), 0)
  
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 18 for calling a global function with example usage: test_clean_psc(rng) without return types