code: def _check_can_reref(inst):
      from ..epochs import BaseEpochs
      from ..evoked import Evoked
      from ..io import BaseRaw
  
      _validate_type(inst, (BaseRaw, BaseEpochs, Evoked), "Instance")
      current_custom = inst.info["custom_ref_applied"]
      if current_custom not in (
          FIFF.FIFFV_MNE_CUSTOM_REF_ON,
          FIFF.FIFFV_MNE_CUSTOM_REF_OFF,
      ):
          raise RuntimeError(
              "Cannot set new reference on data with custom reference type "
              f"{_ref_dict[current_custom]!r}"
          )
  
file_path: mne-python/mne/_fiff/reference.py
imports: import numpy
  from ..defaults import DEFAULTS
  from ..fixes import pinv
  from ..utils import _check_option, _check_preload, _on_missing, _validate_type, fill_doc, logger, verbose, warn
  from .constants import FIFF
  from .meas_info import _check_ch_keys
  from .pick import _ELECTRODE_CH_TYPES, pick_channels, pick_channels_forward, pick_types
  from .proj import _has_eeg_average_ref_proj, make_eeg_average_ref_proj, setup_proj
label_desc: Use image node_id 5 for calling a global function with example usage: _check_can_reref(inst) without return types