code: def _psd_from_mt(x_mt, weights):
      """Compute PSD from tapered spectra.
  
      Parameters
      ----------
      x_mt : array, shape=(..., n_tapers, n_freqs)
          Tapered spectra
      weights : array, shape=(n_tapers,)
          Weights used to combine the tapered spectra
  
      Returns
      -------
      psd : array, shape=(..., n_freqs)
          The computed PSD
      """
      psd = weights * x_mt
      psd *= psd.conj()
      psd = psd.real.sum(axis=-2)
      psd *= 2 / (weights * weights.conj()).real.sum(axis=-2)
      return psd
  
file_path: mne-python/mne/time_frequency/multitaper.py
imports: import numpy
  from scipy.fft import rfft, rfftfreq
  from scipy.integrate import trapezoid
  from scipy.signal import get_window
  from scipy.signal.windows import dpss
  from ..parallel import parallel_func
  from ..utils import _check_option, logger, verbose, warn
label_desc: Use image node_id 3 for calling a global function with example usage: _psd_from_mt(x_mt, weights) and returns: psd