code: def test_compute_distance_to_sensors(picks, limits):
      """Test computation of distances between vertices and sensors."""
      src = read_source_spaces(fname_src)
      fwd = mne.read_forward_solution(fname_fwd)
      info = fwd["info"]
      trans = read_trans(trans_fname)
      # trans = fwd['info']['mri_head_t']
      if isinstance(picks, str):
          kwargs = dict()
          kwargs[picks] = True
          if picks == "eeg":
              info["dev_head_t"] = None  # should not break anything
          use_picks = pick_types(info, **kwargs, exclude=())
      else:
          use_picks = picks
      n_picks = len(_picks_to_idx(info, use_picks, "data", exclude=()))
  
      # Make sure same vertices are used in src and fwd
      src[0]["inuse"] = fwd["src"][0]["inuse"]
      src[1]["inuse"] = fwd["src"][1]["inuse"]
      src[0]["nuse"] = fwd["src"][0]["nuse"]
      src[1]["nuse"] = fwd["src"][1]["nuse"]
  
      n_verts = src[0]["nuse"] + src[1]["nuse"]
  
      # minimum distances between vertices and sensors
      depths = compute_distance_to_sensors(
          src, info=info, picks=use_picks, trans=trans
      )
      assert depths.shape == (n_verts, n_picks)
      assert limits[0] * 5 > depths.min()  # meaningful choice of limits
      assert_array_less(limits[0], depths)
      assert_array_less(depths, limits[1])
  
      # If source space from Forward Solution and trans=None (i.e. identity) then
      # depths2 should be the same as depth.
      depths2 = compute_distance_to_sensors(
          src=fwd["src"], info=info, picks=use_picks, trans=None
      )
      assert_allclose(depths, depths2, rtol=1e-5)
  
      if picks != "eeg":
          # this should break things
          info["dev_head_t"] = None
          with pytest.raises(
              ValueError, match="Transform between meg<->head"
          ):
              compute_distance_to_sensors(src, info, use_picks, trans)
  
imports: from pathlib import Path
  from shutil import copytree
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal, assert_array_less, assert_equal
  import mne
  from mne import SourceEstimate, add_source_space_distances, compute_source_morph, get_volume_labels_from_src, make_sphere_model, morph_source_spaces, pick_types, read_bem_solution, read_bem_surfaces, read_freesurfer_lut, read_source_spaces, read_trans, setup_source_space, setup_volume_source_space, write_source_spaces
  from mne._fiff.constants import FIFF
  from mne._fiff.pick import _picks_to_idx
  from mne.datasets import testing
  from mne.fixes import _get_img_fdata
  from mne.source_estimate import _get_src_type
  from mne.source_space import compute_distance_to_sensors, get_decimated_surfaces
  from mne.source_space._source_space import _compare_source_spaces
  from mne.surface import _accumulate_normals, _triangle_neighbors
  from mne.utils import _record_warnings, requires_mne, run_subprocess
label_desc: Use image node_id 1 for calling a global function with example usage: test_compute_distance_to_sensors(picks, limits) without return types