code: def test_localization_bias_free(
      bias_params_free,
      reg,
      pick_ori,
      weight_norm,
      use_cov,
      depth,
      lower,
      upper,
      real_filter,
  ):
      """Test localization bias for free-orientation DICS."""
      evoked, fwd, noise_cov, data_cov, want = bias_params_free
      noise_csd = _cov_as_csd(noise_cov, evoked.info)
      data_csd = _cov_as_csd(data_cov, evoked.info)
      del noise_cov, data_cov
      if not use_cov:
          evoked.pick(picks="grad")
          noise_csd = None
      filters = make_dics(
          evoked.info,
          fwd,
          data_csd,
          reg,
          noise_csd,
          pick_ori=pick_ori,
          weight_norm=weight_norm,
          depth=depth,
          real_filter=real_filter,
      )
      loc = apply_dics(evoked, filters).data
      loc = (
          np.linalg.norm(loc, axis=1)
          if pick_ori == "vector"
          else np.abs(loc)
      )
      # Compute the percentage of sources for which there is no loc bias:
      perc = (want == np.argmax(loc, axis=0)).mean() * 100
      assert lower <= perc <= upper
  
imports: import copy
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal, assert_array_less
  import mne
  from mne import pick_types
  from mne._fiff.constants import FIFF
  from mne._fiff.pick import pick_info
  from mne.beamformer import Beamformer, apply_dics, apply_dics_csd, apply_dics_epochs, apply_dics_tfr_epochs, make_dics, read_beamformer
  from mne.beamformer._compute_beamformer import _prepare_beamformer_input
  from mne.beamformer._dics import _prepare_noise_csd
  from mne.beamformer.tests.test_lcmv import _assert_weight_norm
  from mne.datasets import testing
  from mne.io import read_info
  from mne.proj import compute_proj_evoked, make_projector
  from mne.surface import _compute_nearest
  from mne.time_frequency import CrossSpectralDensity, EpochsTFR, csd_morlet, csd_tfr
  from mne.time_frequency.csd import _sym_mat_to_vector
  from mne.transforms import apply_trans, invert_transform
  from mne.utils import catch_logging, object_diff
label_desc: Use image node_id 14 for calling a global function with example usage: test_localization_bias_free(bias_params_free, reg, pick_ori, weight_norm, use_cov, depth, lower, upper, real_filter) without return types