code: def _fnirs_spread_bads(info):
      """Spread bad labeling across fnirs channels."""
      # For an optode pair if any component (light frequency or chroma) is marked
      # as bad, then they all should be. This function will find any pairs marked
      # as bad and spread the bad marking to all components of the optode pair.
      picks = _validate_nirs_info(info, check_bads=False)
      new_bads = set(info["bads"])
      for ii, jj in zip(picks[::2], picks[1::2]):
          ch1_name, ch2_name = info.ch_names[ii], info.ch_names[jj]
          if ch1_name in new_bads:
              new_bads.add(ch2_name)
          elif ch2_name in new_bads:
              new_bads.add(ch1_name)
      info["bads"] = sorted(new_bads)
  
      return info
  
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 8 for calling a global function with example usage: _fnirs_spread_bads(info) and returns: info