code: def _check_coil_frame(coils, coord_frame, bem):
      """Check to make sure the coils are in the correct coordinate frame."""
      if coord_frame != FIFF.FIFFV_COORD_MRI:
          if coord_frame == FIFF.FIFFV_COORD_HEAD:
              # Make a transformed duplicate
              coils, coord_Frame = _dup_coil_set(
                  coils, coord_frame, bem["head_mri_t"]
              )
          else:
              raise RuntimeError(
                  "Bad coil coordinate frame %s" % coord_frame
              )
      return coils, coord_frame
  
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 2 for calling a global function with example usage: _check_coil_frame(coils, coord_frame, bem) and returns: coils,  coord_frame