code: def test_spectral_centroid(self):
      np.testing.assert_almost_equal(spectral_centroid(const0, Fs), 0.0)
      np.testing.assert_almost_equal(
          spectral_centroid(const1, Fs), 2.7476856540265033e-14
      )
      np.testing.assert_almost_equal(
          spectral_centroid(constNeg, Fs), 2.7476856540265033e-14
      )
      np.testing.assert_almost_equal(
          spectral_centroid(constF, Fs), 2.4504208511457478e-14
      )
      np.testing.assert_almost_equal(
          spectral_centroid(lin, Fs), 96.7073273343592, decimal=5
      )
      np.testing.assert_almost_equal(
          spectral_centroid(lin0, Fs), 186.91474845748346, decimal=5
      )
      np.testing.assert_almost_equal(
          spectral_centroid(wave, Fs), 5.000000000003773, decimal=5
      )
      np.testing.assert_almost_equal(
          spectral_centroid(offsetWave, Fs),
          1.0000000000008324,
          decimal=5,
      )
      np.testing.assert_almost_equal(
          spectral_centroid(noiseWave, Fs), 181.0147784750644, decimal=5
      )
  
imports: import unittest
  import numpy
  from tsfel.feature_extraction.features import *
label_desc: Use image node_id 40 for calling the TestFeatures obj's underlying member method code with example usage: obj.test_spectral_centroid() without return types