code: def _check_channel_names(inst, ref_names):
      """Check channel names."""
      if isinstance(ref_names, str):
          ref_names = [ref_names]
  
      # Test that the names of the reference channels are present in `ch_names`
      ref_idx = pick_channels(inst.info["ch_names"], ref_names)
      assert len(ref_idx) == len(ref_names)
  
      # Test that the names of the reference channels are present in the `chs`
      # list
      inst.info._check_consistency()
  
imports: import itertools
  from contextlib import nullcontext
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal, assert_equal
  from mne import Epochs, Projection, add_reference_channels, create_info, find_events, make_forward_solution, make_sphere_model, pick_channels, pick_channels_forward, pick_types, read_events, read_evokeds, set_bipolar_reference, set_eeg_reference, setup_volume_source_space
  from mne._fiff.constants import FIFF
  from mne._fiff.proj import _has_eeg_average_ref_proj
  from mne._fiff.reference import _apply_reference
  from mne.datasets import testing
  from mne.epochs import BaseEpochs, make_fixed_length_epochs
  from mne.io import RawArray, read_raw_fif
  from mne.utils import _record_warnings, catch_logging
label_desc: Use image node_id 7 for calling a global function with example usage: _check_channel_names(inst, ref_names) without return types