code: def _sphere_pot_or_field(
      rr, mri_rr, mri_Q, coils, solution, bem_rr, n_jobs, coil_type
  ):
      """Do potential or field for spherical model."""
      fun = _eeg_spherepot_coil if coil_type == "eeg" else _sphere_field
      parallel, p_fun, n_jobs = parallel_func(
          fun, n_jobs, max_jobs=len(rr)
      )
      B = np.concatenate(
          parallel(
              p_fun(r, coils, sphere=solution)
              for r in np.array_split(rr, n_jobs)
          )
      )
      return B
  
imports: from copy import deepcopy
  import numpy
  from .._fiff.constants import FIFF
  from ..bem import _import_openmeeg, _make_openmeeg_geometry
  from ..fixes import bincount, jit
  from ..parallel import parallel_func
  from ..surface import _jit_cross, _project_onto_surface
  from ..transforms import apply_trans, invert_transform
  from ..utils import _check_option, _pl, fill_doc, logger, verbose, warn
label_desc: Use image node_id 14 for calling a global function with example usage: _sphere_pot_or_field(rr, mri_rr, mri_Q, coils, solution, bem_rr, n_jobs, coil_type) and returns: B