code: def test_surface_source_space_doc(src_kind):
      """Test surface source space docstring."""
      # make sure we're correct about this stuff for both kinds!
      if src_kind == "fwd":
          src = mne.read_source_spaces(fname_fwd)
      else:
          assert src_kind == "src"
          src = mne.read_source_spaces(fname_src)
      for s in src:
          if src_kind == "src":  # original
              assert len(s["pinfo"]) == s["nuse"]
              assert_array_equal(s["patch_inds"], np.arange(s["nuse"]))
          else:  # pts removed
              assert len(s["pinfo"]) > s["nuse"]
          all_pinfo = np.concatenate(s["pinfo"])
          assert_array_equal(np.sort(all_pinfo), np.arange(s["np"]))
          assert len(s["patch_inds"]) == s["nuse"]
          assert len(s["vertno"]) == s["nuse"]
          assert len(s["patch_inds"]) == s["nuse"]
          for idx in (0, 42, 173):
              this_dense_vertex = s["vertno"][idx]
              # 'pinfo'
              this_vertex_represents = s["pinfo"][s["patch_inds"][idx]]
              assert len(this_vertex_represents) > 1
              # 'nearest'
              for other in this_vertex_represents:
                  assert s["nearest"][other] == this_dense_vertex
  
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 4 for calling a global function with example usage: test_surface_source_space_doc(src_kind) without return types