code: def test_lcmv_cov(weight_norm, pick_ori):
      """Test LCMV source power computation."""
      (
          raw,
          epochs,
          evoked,
          data_cov,
          noise_cov,
          label,
          forward,
          forward_surf_ori,
          forward_fixed,
          forward_vol,
      ) = _get_data()
      convert_forward_solution(forward, surf_ori=True, copy=False)
      filters = make_lcmv(
          evoked.info,
          forward,
          data_cov,
          noise_cov=noise_cov,
          weight_norm=weight_norm,
          pick_ori=pick_ori,
      )
      for cov in (data_cov, noise_cov):
          this_cov = pick_channels_cov(
              cov, evoked.ch_names, ordered=False
          )
          this_evoked = evoked.copy().pick(this_cov["names"])
          this_cov["projs"] = this_evoked.info["projs"]
          assert this_evoked.ch_names == this_cov["names"]
          stc = apply_lcmv_cov(this_cov, filters)
          assert stc.data.min() > 0
          assert stc.shape == (498, 1)
          ev = EvokedArray(this_cov.data, this_evoked.info)
          stc_1 = apply_lcmv(ev, filters)
          assert stc_1.data.min() < 0
          ev = EvokedArray(stc_1.data.T, this_evoked.info)
          stc_2 = apply_lcmv(ev, filters)
          assert stc_2.data.shape == (498, 498)
          data = np.diag(stc_2.data)[:, np.newaxis]
          assert data.min() > 0
          assert_allclose(data, stc.data, rtol=1e-12)
  
imports: from contextlib import nullcontext
  from copy import deepcopy
  from inspect import signature
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_array_less
  from scipy import linalg
  from scipy.spatial.distance import cdist
  import mne
  from mne import EvokedArray, VolSourceEstimate, VolVectorSourceEstimate, compute_rank, convert_forward_solution, pick_channels_cov, read_forward_solution, read_vectorview_selection
  from mne._fiff.compensator import set_current_comp
  from mne._fiff.constants import FIFF
  from mne.beamformer import Beamformer, apply_lcmv, apply_lcmv_cov, apply_lcmv_epochs, apply_lcmv_raw, make_dics, make_lcmv, read_beamformer
  from mne.beamformer._compute_beamformer import _prepare_beamformer_input
  from mne.datasets import testing
  from mne.minimum_norm import apply_inverse, make_inverse_operator
  from mne.minimum_norm.tests.test_inverse import _assert_free_ori_match
  from mne.simulation import simulate_evoked
  from mne.transforms import apply_trans, invert_transform
  from mne.utils import _record_warnings, catch_logging, object_diff
label_desc: Use image node_id 6 for calling a global function with example usage: test_lcmv_cov(weight_norm, pick_ori) without return types