code: def _compare_ch_names(names1, names2, bads):
      """Return channel names of common and good channels."""
      ch_names = [
          ch for ch in names1 if ch not in bads and ch in names2
      ]
      return ch_names
  
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 31 for calling a global function with example usage: _compare_ch_names(names1, names2, bads) and returns: ch_names