code: def _fnirs_optode_names(info):
      """Return list of unique optode names."""
      picks_wave = _picks_to_idx(
          info,
          ["fnirs_cw_amplitude", "fnirs_od"],
          exclude=[],
          allow_empty=True,
      )
      picks_chroma = _picks_to_idx(
          info, ["hbo", "hbr"], exclude=[], allow_empty=True
      )
  
      if len(picks_wave) > 0:
          regex = _S_D_F_RE
      elif len(picks_chroma) > 0:
          regex = _S_D_H_RE
      else:
          return [], []
  
      sources = np.unique(
          [int(regex.match(ch).groups()[0]) for ch in info.ch_names]
      )
      detectors = np.unique(
          [int(regex.match(ch).groups()[1]) for ch in info.ch_names]
      )
  
      src_names = [f"S{s}" for s in sources]
      det_names = [f"D{d}" for d in detectors]
  
      return src_names, det_names
  
file_path: mne-python/mne/preprocessing/nirs/nirs.py
imports: import re
  import numpy
  from ..._fiff.pick import _picks_to_idx, pick_types
  from ...utils import _check_option, _validate_type, fill_doc
label_desc: Use image node_id 9 for calling a global function with example usage: _fnirs_optode_names(info) and returns: src_names,  det_names, list,  list