code: def assert_forward_allclose(f1, f2, rtol=1e-7):
      """Compare two potentially converted forward solutions."""
      assert_allclose(f1["sol"]["data"], f2["sol"]["data"], rtol=rtol)
      assert f1["sol"]["ncol"] == f2["sol"]["ncol"]
      assert f1["sol"]["ncol"] == f1["sol"]["data"].shape[1]
      assert_allclose(f1["source_nn"], f2["source_nn"], rtol=rtol)
      if f1["sol_grad"] is not None:
          assert f2["sol_grad"] is not None
          assert_allclose(
              f1["sol_grad"]["data"], f2["sol_grad"]["data"]
          )
          assert f1["sol_grad"]["ncol"] == f2["sol_grad"]["ncol"]
          assert (
              f1["sol_grad"]["ncol"] == f1["sol_grad"]["data"].shape[1]
          )
      else:
          assert f2["sol_grad"] is None
      assert f1["source_ori"] == f2["source_ori"]
      assert f1["surf_ori"] == f2["surf_ori"]
      assert f1["src"][0]["coord_frame"] == f1["src"][0]["coord_frame"]
  
imports: import gc
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from mne import SourceEstimate, VectorSourceEstimate, apply_forward, apply_forward_raw, average_forward_solutions, convert_forward_solution, pick_types_forward, read_evokeds, read_forward_solution, write_forward_solution
  from mne._fiff.pick import pick_channels_forward
  from mne.channels import equalize_channels
  from mne.datasets import testing
  from mne.forward import Forward, compute_depth_prior, compute_orient_prior, is_fixed_orient, restrict_forward_to_label, restrict_forward_to_stc
  from mne.io import read_info
  from mne.label import read_label
  from mne.utils import requires_mne, run_subprocess
label_desc: Use image node_id 1 for calling a global function with example usage: assert_forward_allclose(f1, f2, rtol) without return types