code: def _check_info_exclude(info, exclude):
      _validate_type(info, "info")
      info._check_consistency()
      if exclude is None:
          raise ValueError(
              'exclude must be a list of strings or "bads"'
          )
      elif exclude == "bads":
          exclude = info.get("bads", [])
      elif not isinstance(exclude, (list, tuple)):
          raise ValueError(
              'exclude must either be "bads" or a list of strings.'
              " If only one channel is to be excluded, use "
              "[ch_name] instead of passing ch_name."
          )
      return exclude
  
imports: import re
  from copy import deepcopy
  import numpy
  from ..utils import _check_option, _ensure_int, _validate_type, fill_doc, logger, verbose, warn
  from .constants import FIFF
label_desc: Use image node_id 9 for calling a global function with example usage: _check_info_exclude(info, exclude) and returns: exclude