code: def test_complex_multitaper():
      """Test complex-valued multitaper output."""
      data, sfreq, _ = _make_psd_data()
      psd_complex, freq_complex, weights = psd_array_multitaper(
          data[:4, :500], sfreq, output="complex"
      )
      psd, freq = psd_array_multitaper(
          data[:4, :500], sfreq, output="power"
      )
      assert_array_equal(freq_complex, freq)
      assert psd_complex.ndim == 3  # channels x tapers x freqs
      psd_from_complex = _psd_from_mt(psd_complex, weights)
      assert_allclose(psd_from_complex, psd)
  
file_path: mne-python/mne/time_frequency/tests/test_psd.py
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal
  from scipy.signal import welch
  from mne.time_frequency import psd_array_multitaper, psd_array_welch
  from mne.time_frequency.multitaper import _psd_from_mt
  from mne.time_frequency.psd import _median_biases
  from mne.utils import catch_logging
label_desc: Use image node_id 5 for calling a global function with example usage: test_complex_multitaper() without return types