code: def test_make_inverse_operator_loose(evoked, tmp_path):
      """Test MNE inverse computation (precomputed and non-precomputed)."""
      # Test old version of inverse computation starting from forward operator
      noise_cov = read_cov(fname_cov)
      inverse_operator = read_inverse_operator(fname_inv)
      fwd_op = convert_forward_solution(
          read_forward_solution_meg(fname_fwd),
          surf_ori=True,
          copy=False,
      )
      with catch_logging() as log:
          my_inv_op = make_inverse_operator(
              evoked.info,
              fwd_op,
              noise_cov,
              loose=0.2,
              depth=dict(exp=0.8, limit_depth_chs=False),
              verbose=True,
          )
      log = log.getvalue()
      assert "MEG: rank 302 computed" in log
      assert "limit = 1/%d" % fwd_op["nsource"] in log
      assert "Loose (0.2)" in repr(my_inv_op)
      _compare_io(my_inv_op, tmp_path=tmp_path)
      assert_equal(inverse_operator["units"], "Am")
      _compare_inverses_approx(
          my_inv_op,
          inverse_operator,
          evoked,
          rtol=1e-2,
          atol=1e-5,
          depth_atol=1e-3,
      )
      # Test MNE inverse computation starting from forward operator
      with catch_logging() as log:
          my_inv_op = make_inverse_operator(
              evoked.info,
              fwd_op,
              noise_cov,
              loose="auto",
              depth=0.8,
              fixed=False,
              verbose=True,
          )
      log = log.getvalue()
      assert "MEG: rank 302 computed from 305" in log
      _compare_io(my_inv_op, tmp_path=tmp_path)
      _compare_inverses_approx(
          my_inv_op, inverse_operator, evoked, rtol=1e-3, atol=1e-5
      )
      assert "dev_head_t" in my_inv_op["info"]
      assert "mri_head_t" in my_inv_op
  
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 7 for calling a global function with example usage: test_make_inverse_operator_loose(evoked, tmp_path) without return types