code: def stft_norm2(X):
      """Compute L2 norm of STFT transform.
  
      It takes into account that stft only return positive frequencies.
      As we use tight frame this quantity is conserved by the stft.
  
      Parameters
      ----------
      X : 3D complex array
          The STFT transforms
  
      Returns
      -------
      norms2 : array
          The squared L2 norm of every row of X.
      """
      X2 = (X * X.conj()).real
      # compute all L2 coefs and remove first and last frequency once.
      norms2 = (
          2.0 * X2.sum(axis=2).sum(axis=1)
          - np.sum(X2[:, 0, :], axis=1)
          - np.sum(X2[:, -1, :], axis=1)
      )
      return norms2
  
file_path: mne-python/mne/time_frequency/_stft.py
imports: from math import ceil
  import numpy
  from scipy.fft import irfft, rfft, rfftfreq
  from ..utils import logger, verbose
label_desc: Use image node_id 4 for calling a global function with example usage: stft_norm2(X) and returns: norms2