code: def _check_comp(comp):
      """Check that conversion to named matrices is possible."""
      ref_sens = None
      kind = -1
      for k, c_k in enumerate(comp):
          if c_k["coeff_type"] != kind:
              c_ref = c_k
              ref_sens = c_ref["sensors"]
              kind = c_k["coeff_type"]
          elif not c_k["sensors"] == ref_sens:
              raise RuntimeError(
                  "Cannot use an uneven compensation matrix"
              )
  
imports: import os.path
  from calendar import timegm
  from time import strptime
  import numpy
  from ..._fiff.constants import FIFF
  from ..._fiff.ctf_comp import _add_kind, _calibrate_comp
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.write import get_new_file_id
  from ...annotations import Annotations
  from ...transforms import _coord_frame_name, apply_trans, combine_transforms, invert_transform
  from ...utils import _clean_names, logger, warn
  from .constants import CTF
label_desc: Use image node_id 8 for calling a global function with example usage: _check_comp(comp) without return types