code: def _compute_power(Cm, W, n_orient):
      """Use beamformer filters to compute source power.
  
      Parameters
      ----------
      Cm : ndarray, shape (n_channels, n_channels)
          Data covariance matrix or CSD matrix.
      W : ndarray, shape (nvertices*norient, nchannels)
          Beamformer weights.
  
      Returns
      -------
      power : ndarray, shape (nvertices,)
          Source power.
      """
      n_sources = W.shape[0] // n_orient
  
      Wk = W.reshape(n_sources, n_orient, W.shape[1])
      source_power = np.trace(
          (Wk @ Cm @ Wk.conj().transpose(0, 2, 1)).real,
          axis1=1,
          axis2=2,
      )
  
      return source_power
  
imports: from copy import deepcopy
  import numpy
  from .._fiff.proj import Projection, make_projector
  from ..cov import Covariance, make_ad_hoc_cov
  from ..forward.forward import _restrict_forward_to_src_sel, is_fixed_orient
  from ..minimum_norm.inverse import _get_vertno, _prepare_forward
  from ..source_space._source_space import label_src_vertno_sel
  from ..time_frequency.csd import CrossSpectralDensity
  from ..utils import _check_option, _check_src_normal, _import_h5io_funcs, _pl, _reg_pinv, _sym_mat_pow, check_fname, logger, verbose, warn
label_desc: Use image node_id 7 for calling a global function with example usage: _compute_power(Cm, W, n_orient) and returns: source_power