code: def test_spectrum(self, kind):
      freqs = self.freqs_spectrum
      spec, fsp = getattr(mlab, f"{kind}_spectrum")(
          x=self.y,
          Fs=self.Fs,
          sides=self.sides,
          pad_to=self.pad_to_spectrum,
      )
      assert_allclose(fsp, freqs, atol=1e-06)
      assert spec.shape == freqs.shape
      if kind == "magnitude":
          self.check_maxfreq(spec, fsp, self.fstims)
          self.check_freqs(spec, freqs, fsp, self.fstims)
  
imports: from numpy.testing import assert_allclose, assert_almost_equal, assert_array_equal, assert_array_almost_equal_nulp
  import numpy
  import pytest
  from matplotlib import mlab
label_desc: Use image node_id 16 for calling the TestSpectral obj's underlying member method code with example usage: obj.test_spectrum(kind) without return types