docstr: Test zero padding of csd().
docstr_tok: ["Test","zero","padding","of","csd","(",")","."]
code: def test_csd_padding(self):
      """Test zero padding of csd()."""
      if self.NFFT_density is None:  # for derived classes
          return
      sargs = dict(
          x=self.y,
          y=self.y + 1,
          Fs=self.Fs,
          window=mlab.window_none,
          sides=self.sides,
      )
  
      spec0, _ = mlab.csd(NFFT=self.NFFT_density, **sargs)
      spec1, _ = mlab.csd(NFFT=self.NFFT_density * 2, **sargs)
      assert_almost_equal(
          np.sum(np.conjugate(spec0) * spec0).real,
          np.sum(np.conjugate(spec1 / 2) * spec1 / 2).real,
      )
  
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 8 for calling the TestSpectral obj's underlying member method code with example usage: obj.test_csd_padding() without return types