code: def test_make_inverse_operator_fixed(evoked, noise_cov):
      """Test MNE inverse computation (fixed orientation)."""
      fwd = read_forward_solution_meg(fname_fwd)
  
      # can't make fixed inv with depth weighting without free ori fwd
      fwd_fixed = convert_forward_solution(
          fwd, force_fixed=True, use_cps=True
      )
      pytest.raises(
          ValueError,
          make_inverse_operator,
          evoked.info,
          fwd_fixed,
          noise_cov,
          depth=0.8,
          fixed=True,
      )
  
      # now compare to C solution
      # note that the forward solution must not be surface-oriented
      # to get equivalence (surf_ori=True changes the normals)
      with catch_logging() as log:
          inv_op = make_inverse_operator(  # test depth=0. alias for depth=None
              evoked.info,
              fwd,
              noise_cov,
              depth=0.0,
              fixed=True,
              use_cps=False,
              verbose=True,
          )
      log = log.getvalue()
      assert "MEG: rank 302 computed from 305" in log
      assert "EEG channels: 0" in repr(inv_op)
      assert "MEG channels: 305" in repr(inv_op)
      assert "Fixed" in repr(inv_op)
      del fwd_fixed
      inverse_operator_nodepth = read_inverse_operator(
          fname_inv_fixed_nodepth
      )
      # XXX We should have this but we don't (MNE-C doesn't restrict info):
      # assert 'EEG channels: 0' in repr(inverse_operator_nodepth)
      assert "MEG channels: 305" in repr(inverse_operator_nodepth)
      _compare_inverses_approx(
          inverse_operator_nodepth, inv_op, evoked, rtol=1e-5, atol=1e-4
      )
      # Inverse has 306 channels - 6 proj = 302
      assert compute_rank_inverse(inverse_operator_nodepth) == 302
      # Now with depth
      fwd_surf = convert_forward_solution(
          fwd, surf_ori=True
      )  # not fixed
      for kwargs, use_fwd in zip(
          [dict(fixed=True), dict(loose=0.0)], [fwd, fwd_surf]
      ):  # Should be equiv.
          inv_op_depth = make_inverse_operator(
              evoked.info,
              use_fwd,
              noise_cov,
              depth=0.8,
              use_cps=True,
              **kwargs,
          )
          inverse_operator_depth = read_inverse_operator(
              fname_inv_fixed_depth
          )
          # Normals should be the adjusted ones
          assert_allclose(
              inverse_operator_depth["source_nn"],
              fwd_surf["source_nn"][2::3],
              atol=1e-5,
          )
          _compare_inverses_approx(
              inverse_operator_depth,
              inv_op_depth,
              evoked,
              rtol=1e-3,
              atol=1e-4,
          )
  
imports: import copy
  import re
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_array_less, assert_equal
  from scipy import sparse
  import mne
  from mne import Covariance, EvokedArray, SourceEstimate, combine_evoked, compute_raw_covariance, convert_forward_solution, make_ad_hoc_cov, make_forward_solution, make_sphere_model, pick_channels_forward, pick_types, pick_types_forward, read_cov, read_evokeds, read_forward_solution
  from mne.datasets import testing
  from mne.epochs import Epochs, EpochsArray, make_fixed_length_epochs
  from mne.event import read_events
  from mne.forward import apply_forward, is_fixed_orient, restrict_forward_to_stc
  from mne.io import read_info, read_raw_fif
  from mne.label import label_sign_flip, read_label
  from mne.minimum_norm import INVERSE_METHODS, apply_inverse, apply_inverse_cov, apply_inverse_epochs, apply_inverse_raw, apply_inverse_tfr_epochs, compute_rank_inverse, make_inverse_operator, prepare_inverse_operator, read_inverse_operator, write_inverse_operator
  from mne.source_estimate import VolSourceEstimate, read_source_estimate
  from mne.source_space._source_space import _get_src_nn
  from mne.surface import _normal_orth
  from mne.time_frequency import EpochsTFR
  from mne.utils import _record_warnings, catch_logging
label_desc: Use image node_id 19 for calling a global function with example usage: test_make_inverse_operator_fixed(evoked, noise_cov) without return types