code: def _source_induced_power(
      epochs,
      inverse_operator,
      freqs,
      label=None,
      lambda2=1.0 / 9.0,
      method="dSPM",
      nave=1,
      n_cycles=5,
      decim=1,
      use_fft=False,
      pca=True,
      pick_ori="normal",
      n_jobs=None,
      with_plv=True,
      zero_mean=False,
      prepared=False,
      method_params=None,
      use_cps=True,
      verbose=None,
  ):
      """Aux function for source induced power."""
      if label:
          _validate_type(
              label,
              types=(Label, BiHemiLabel, list, tuple, None),
              type_name=(
                  "Label or BiHemiLabel",
                  "list of labels",
                  "None",
              ),
          )
          if isinstance(label, (list, tuple)):
              for item in label:
                  _validate_type(
                      item,
                      types=(Label, BiHemiLabel),
                      type_name=("Label or BiHemiLabel"),
                  )
              if len(label) > 1 and with_plv:
                  raise RuntimeError(
                      "Phase-locking value cannot be calculated "
                      "when averaging induced power within "
                      "labels. Please set `with_plv` to False, pass a "
                      "single `label=label`, or set `label=None`."
                  )
  
      epochs_data = epochs.get_data(copy=False)
      (
          K,
          sel,
          Vh,
          vertno,
          is_free_ori,
          noise_norm,
          k_id,
      ) = _prepare_source_params(
          inst=epochs,
          inverse_operator=inverse_operator,
          label=label,
          lambda2=lambda2,
          method=method,
          nave=nave,
          pca=pca,
          pick_ori=pick_ori,
          prepared=prepared,
          method_params=method_params,
          use_cps=use_cps,
      )
  
      inv = inverse_operator
      parallel, my_compute_source_tfrs, n_jobs = parallel_func(
          _compute_pow_plv, n_jobs, max_jobs=len(epochs_data)
      )
      Fs = epochs.info["sfreq"]  # sampling in Hz
  
      logger.info("Computing source power ...")
  
      Ws = morlet(Fs, freqs, n_cycles=n_cycles, zero_mean=zero_mean)
  
      out = parallel(
          my_compute_source_tfrs(
              data=data,
              K=K,
              sel=sel,
              Ws=Ws,
              source_ori=inv["source_ori"],
              use_fft=use_fft,
              Vh=Vh,
              with_plv=with_plv,
              with_power=True,
              pick_ori=pick_ori,
              decim=decim,
              noise_norm=noise_norm,
          )
          for data in np.array_split(epochs_data, n_jobs)
      )
      power = sum(
          o[0] for o in out
      )  # power shape: (n_verts, n_freqs, n_samps)
      power /= len(epochs_data)  # average power over epochs
  
      if isinstance(label, (Label, BiHemiLabel)):
          logger.info(
              f"Outputting power for {len(power)} vertices in label {label.name}."
          )
      elif isinstance(label, list):
          power = _get_label_power(power, label, vertno, k_id)
          logger.info(
              "Averaging induced power across vertices within labels "
              f"for {len(label)} label{_pl(label)}."
          )
      else:
          assert not label
  
      if with_plv:
          plv = sum(o[1] for o in out)
          plv = np.abs(plv)
          plv /= len(epochs_data)  # average power over epochs
      else:
          plv = None
  
      return power, plv, vertno
  
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 8 for calling a global function with example usage: _source_induced_power(epochs, inverse_operator, freqs, label, lambda2, method, nave, n_cycles, decim, use_fft, pca, pick_ori, n_jobs, with_plv, zero_mean, prepared, method_params, use_cps, verbose) and returns: power,  plv,  vertno