code: def tfr_array_stockwell(
      data,
      sfreq,
      fmin=None,
      fmax=None,
      n_fft=None,
      width=1.0,
      decim=1,
      return_itc=False,
      n_jobs=None,
  ):
      """Compute power and intertrial coherence using Stockwell (S) transform.
  
      Same computation as `~mne.time_frequency.tfr_stockwell`, but operates on
      :class:`NumPy arrays <numpy.ndarray>` instead of `~mne.Epochs` objects.
  
      See :footcite:`Stockwell2007,MoukademEtAl2014,WheatEtAl2010,JonesEtAl2006`
      for more information.
  
      Parameters
      ----------
      data : ndarray, shape (n_epochs, n_channels, n_times)
          The signal to transform.
      sfreq : float
          The sampling frequency.
      fmin : None, float
          The minimum frequency to include. If None defaults to the minimum fft
          frequency greater than zero.
      fmax : None, float
          The maximum frequency to include. If None defaults to the maximum fft.
      n_fft : int | None
          The length of the windows used for FFT. If None, it defaults to the
          next power of 2 larger than the signal length.
      width : float
          The width of the Gaussian window. If < 1, increased temporal
          resolution, if > 1, increased frequency resolution. Defaults to 1.
          (classical S-Transform).
      decim : int
          The decimation factor on the time axis. To reduce memory usage.
      return_itc : bool
          Return intertrial coherence (ITC) as well as averaged power.
      %(n_jobs)s
  
      Returns
      -------
      st_power : ndarray
          The multitaper power of the Stockwell transformed data.
          The last two dimensions are frequency and time.
      itc : ndarray
          The intertrial coherence. Only returned if return_itc is True.
      freqs : ndarray
          The frequencies.
  
      See Also
      --------
      mne.time_frequency.tfr_stockwell
      mne.time_frequency.tfr_multitaper
      mne.time_frequency.tfr_array_multitaper
      mne.time_frequency.tfr_morlet
      mne.time_frequency.tfr_array_morlet
  
      References
      ----------
      .. footbibliography::
      """
      _validate_type(data, np.ndarray, "data")
      if data.ndim != 3:
          raise ValueError(
              "data must be 3D with shape (n_epochs, n_channels, n_times), "
              f"got {data.shape}"
          )
      n_epochs, n_channels = data.shape[:2]
      n_out = data.shape[2] // decim + bool(data.shape[-1] % decim)
      data, n_fft_, zero_pad = _check_input_st(data, n_fft)
  
      freqs = fftfreq(n_fft_, 1.0 / sfreq)
      if fmin is None:
          fmin = freqs[freqs > 0][0]
      if fmax is None:
          fmax = freqs.max()
  
      start_f = np.abs(freqs - fmin).argmin()
      stop_f = np.abs(freqs - fmax).argmin()
      freqs = freqs[start_f:stop_f]
  
      W = _precompute_st_windows(
          data.shape[-1], start_f, stop_f, sfreq, width
      )
      n_freq = stop_f - start_f
      psd = np.empty((n_channels, n_freq, n_out))
      itc = (
          np.empty((n_channels, n_freq, n_out)) if return_itc else None
      )
  
      parallel, my_st, n_jobs = parallel_func(_st_power_itc, n_jobs)
      tfrs = parallel(
          my_st(data[:, c, :], start_f, return_itc, zero_pad, decim, W)
          for c in range(n_channels)
      )
      for c, (this_psd, this_itc) in enumerate(iter(tfrs)):
          psd[c] = this_psd
          if this_itc is not None:
              itc[c] = this_itc
  
      return psd, itc, freqs
  
file_path: mne-python/mne/time_frequency/_stockwell.py
imports: from copy import deepcopy
  import numpy
  from scipy.fft import fft, fftfreq, ifft
  from .._fiff.pick import _pick_data_channels, pick_info
  from ..parallel import parallel_func
  from ..utils import _validate_type, fill_doc, logger, verbose
  from .tfr import AverageTFR, _get_data
label_desc: Use image node_id 5 for calling a global function with example usage: tfr_array_stockwell(data, sfreq, fmin, fmax, n_fft, width, decim, return_itc, n_jobs) and returns: psd,  itc,  freqs