code: def _compare_bem_solutions(sol_a, sol_b):
      """Compare BEM solutions."""
      # compare the surfaces we used
      _compare_bem_surfaces(sol_a["surfs"], sol_b["surfs"])
      # compare the actual solutions
      names = [
          "bem_method",
          "field_mult",
          "gamma",
          "is_sphere",
          "nsol",
          "sigma",
          "source_mult",
          "solution",
      ]
      assert set(sol_a.keys()) == set(sol_b.keys())
      assert set(names + ["solver", "surfs"]) == set(sol_b.keys())
      assert sol_a["solver"] == sol_b["solver"]
      for key in names[:-1]:
          assert_allclose(
              sol_a[key],
              sol_b[key],
              rtol=1e-3,
              atol=1e-5,
              err_msg="Mismatch: %s" % key,
          )
  
imports: import re
  from copy import deepcopy
  from os import makedirs
  from pathlib import Path
  from shutil import copy
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_equal
  import mne
  from mne import Info, Transform, make_bem_model, make_bem_solution, make_sphere_model, read_bem_solution, read_bem_surfaces, write_bem_solution, write_bem_surfaces, write_head_bem, write_surface
  from mne._fiff.constants import FIFF
  from mne.bem import _assert_complete_surface, _assert_inside, _bem_find_surface, _check_surface_size, _get_ico_map, _ico_downsample, _order_surfaces, distance_to_bem, fit_sphere_to_headshape, make_scalp_surfaces
  from mne.datasets import testing
  from mne.io import read_info
  from mne.surface import _get_ico_surface, read_surface
  from mne.transforms import translation
  from mne.utils import catch_logging, check_version
label_desc: Use image node_id 2 for calling a global function with example usage: _compare_bem_solutions(sol_a, sol_b) without return types