code: def test_convert_forward():
      """Test converting forward solution between different representations."""
      fwd = read_forward_solution(fname_meeg_grad)
      fwd_repr = repr(fwd)
      assert "306" in fwd_repr
      assert "60" in fwd_repr
      assert fwd_repr
      assert isinstance(fwd, Forward)
      # look at surface orientation
      fwd_surf = convert_forward_solution(fwd, surf_ori=True)
      # go back
      fwd_new = convert_forward_solution(fwd_surf, surf_ori=False)
      assert repr(fwd_new)
      assert isinstance(fwd_new, Forward)
      assert_forward_allclose(fwd, fwd_new)
      del fwd_new
      gc.collect()
  
      # now go to fixed
      fwd_fixed = convert_forward_solution(
          fwd_surf, surf_ori=True, force_fixed=True, use_cps=False
      )
      del fwd_surf
      gc.collect()
      assert repr(fwd_fixed)
      assert isinstance(fwd_fixed, Forward)
      assert is_fixed_orient(fwd_fixed)
      # now go back to cartesian (original condition)
      fwd_new = convert_forward_solution(
          fwd_fixed, surf_ori=False, force_fixed=False
      )
      assert repr(fwd_new)
      assert isinstance(fwd_new, Forward)
      assert_forward_allclose(fwd, fwd_new)
      del fwd, fwd_new, fwd_fixed
      gc.collect()
  
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 2 for calling a global function with example usage: test_convert_forward() without return types