code: def _single_epoch_tfr(
      data,
      is_free_ori,
      K,
      Ws,
      use_fft,
      decim,
      shape,
      with_plv,
      with_power,
  ):
      """Compute single trial TFRs, either ITC, power or raw TFR."""
      tfr_e = np.zeros(shape, dtype=np.float64)  # power or raw TFR
      # phase lock
      plv_e = np.zeros(shape, dtype=np.complex128) if with_plv else None
      n_sources, _, n_times = shape
      for f, w in enumerate(Ws):
          tfr_ = cwt(data, [w], use_fft=use_fft, decim=decim)
          tfr_ = np.asfortranarray(tfr_.reshape(len(data), -1))
  
          # phase lock and power at freq f
          if with_plv:
              plv_f = np.zeros(
                  (n_sources, n_times), dtype=np.complex128
              )
  
          tfr_f = np.zeros((n_sources, n_times), dtype=np.float64)
  
          for k, t in enumerate([np.real(tfr_), np.imag(tfr_)]):
              sol = np.dot(K, t)
  
              sol_pick_normal = sol
              if is_free_ori:
                  sol_pick_normal = sol[2::3]
  
              if with_plv:
                  if k == 0:  # real
                      plv_f += sol_pick_normal
                  else:  # imag
                      plv_f += 1j * sol_pick_normal
  
              if is_free_ori:
                  logger.debug("combining the current components...")
                  sol = combine_xyz(sol, square=with_power)
              elif with_power:
                  sol *= sol
              tfr_f += sol
              del sol
  
          tfr_e[:, f, :] += tfr_f
          del tfr_f
  
          if with_plv:
              plv_f /= np.abs(plv_f)
              plv_e[:, f, :] += plv_f
              del plv_f
  
      return tfr_e, plv_e
  
imports: import numpy
  from .._fiff.constants import FIFF
  from .._fiff.pick import pick_info
  from ..baseline import _log_rescale, rescale
  from ..epochs import Epochs
  from ..event import make_fixed_length_events
  from ..evoked import EvokedArray
  from ..fixes import _safe_svd
  from ..label import BiHemiLabel, Label
  from ..parallel import parallel_func
  from ..source_estimate import _make_stc
  from ..time_frequency.multitaper import _compute_mt_params, _mt_spectra, _psd_from_mt, _psd_from_mt_adaptive
  from ..time_frequency.tfr import cwt, morlet
  from ..utils import ProgressBar, _check_option, _pl, _validate_type, logger, verbose
  from .inverse import INVERSE_METHODS, _assemble_kernel, _check_or_prepare, _check_ori, _pick_channels_inverse_operator, _subject_from_inverse, combine_xyz
label_desc: Use image node_id 6 for calling a global function with example usage: _single_epoch_tfr(data, is_free_ori, K, Ws, use_fft, decim, shape, with_plv, with_power) and returns: tfr_e,  plv_e