code: def _check_channels_spatial_filter(ch_names, filters):
      """Return data channel indices to be used with spatial filter.
  
      Unlike ``pick_channels``, this respects the order of ch_names.
      """
      sel = []
      # first check for channel discrepancies between filter and data:
      for ch_name in filters["ch_names"]:
          if ch_name not in ch_names:
              raise ValueError(
                  "The spatial filter was computed with channel %s "
                  "which is not present in the data. You should "
                  "compute a new spatial filter restricted to the "
                  "good data channels." % ch_name
              )
      # then compare list of channels and get selection based on data:
      sel = [
          ii
          for ii, ch_name in enumerate(ch_names)
          if ch_name in filters["ch_names"]
      ]
      return sel
  
imports: import numbers
  import operator
  import os
  import re
  from builtins import input
  from difflib import get_close_matches
  from importlib import import_module
  from pathlib import Path
  import numpy
  from ..defaults import HEAD_SIZE_DEFAULT, _handle_default
  from ..fixes import _compare_version, _median_complex
  from ._logging import _record_warnings, _verbose_safe_false, logger, verbose, warn
label_desc: Use image node_id 32 for calling a global function with example usage: _check_channels_spatial_filter(ch_names, filters) and returns: sel