code: def _get_eog_channel_index(ch_name, inst):
      """Get EOG channel indices."""
      _validate_type(
          ch_name, types=(None, str, list), item_name="ch_name"
      )
  
      if ch_name is None:
          eog_inds = pick_types(
              inst.info,
              meg=False,
              eeg=False,
              stim=False,
              eog=True,
              ecg=False,
              emg=False,
              ref_meg=False,
              exclude="bads",
          )
          if eog_inds.size == 0:
              raise RuntimeError("No EOG channel(s) found")
          ch_names = [inst.ch_names[i] for i in eog_inds]
      elif isinstance(ch_name, str):
          ch_names = [ch_name]
      else:  # it's a list
          ch_names = ch_name.copy()
  
      # ensure the specified channels are present in the data
      if ch_name is not None:
          not_found = [
              ch_name
              for ch_name in ch_names
              if ch_name not in inst.ch_names
          ]
          if not_found:
              raise ValueError(
                  f"The specified EOG channel{_pl(not_found)} "
                  f'cannot be found: {", ".join(not_found)}'
              )
  
          eog_inds = pick_channels(inst.ch_names, include=ch_names)
  
      logger.info(
          f'Using EOG channel{_pl(ch_names)}: {", ".join(ch_names)}'
      )
      return eog_inds
  
file_path: mne-python/mne/preprocessing/eog.py
imports: import numpy
  from .._fiff.pick import pick_channels, pick_types
  from ..epochs import Epochs
  from ..filter import filter_data
  from ..utils import _pl, _validate_type, logger, verbose
  from ._peak_finder import peak_finder
label_desc: Use image node_id 3 for calling a global function with example usage: _get_eog_channel_index(ch_name, inst) and returns: eog_inds