code: def test_centroid(self):
      np.testing.assert_almost_equal(calc_centroid(const0, Fs), 0.0)
      np.testing.assert_almost_equal(
          calc_centroid(const1, Fs), 0.009499999999999998
      )
      np.testing.assert_almost_equal(
          calc_centroid(constNeg, Fs), 0.009499999999999998
      )
      np.testing.assert_almost_equal(calc_centroid(constF, Fs), 0.0095)
      np.testing.assert_almost_equal(
          calc_centroid(lin, Fs), 0.014615384615384615
      )
      np.testing.assert_almost_equal(
          calc_centroid(lin0, Fs), 0.0095, decimal=5
      )
      np.testing.assert_almost_equal(
          calc_centroid(wave, Fs), 0.5000000000000001, decimal=5
      )
      np.testing.assert_almost_equal(
          calc_centroid(offsetWave, Fs), 0.47126367059427926, decimal=5
      )
      np.testing.assert_almost_equal(
          calc_centroid(noiseWave, Fs), 0.4996034303128802, decimal=5
      )
  
imports: import unittest
  import numpy
  from tsfel.feature_extraction.features import *
label_desc: Use image node_id 21 for calling the TestFeatures obj's underlying member method code with example usage: obj.test_centroid() without return types