code: def _has_eeg_average_ref_proj(
      info,
      *,
      projs=None,
      check_active=False,
      ch_type=None,
      verbose=None,
  ):
      """Determine if a list of projectors has an average EEG ref.
  
      Optionally, set check_active=True to additionally check if the CAR
      has already been applied.
      """
      from .meas_info import Info
  
      _validate_type(info, Info, "info")
      projs = info.get("projs", []) if projs is None else projs
      if ch_type is None:
          pick_kwargs = _EEG_AVREF_PICK_DICT
      else:
          ch_type = [ch_type] if isinstance(ch_type, str) else ch_type
          pick_kwargs = {ch_type: True for ch_type in ch_type}
      ch_type = "/".join(c.upper() for c in pick_kwargs)
      want_names = [
          info["ch_names"][pick]
          for pick in pick_types(info, exclude="bads", **pick_kwargs)
      ]
      if not want_names:
          return False
      found_names = list()
      for proj in projs:
          if proj["kind"] == FIFF.FIFFV_PROJ_ITEM_EEG_AVREF or re.match(
              "^Average .* reference$", proj["desc"]
          ):
              if not check_active or proj["active"]:
                  found_names.extend(proj["data"]["col_names"])
      # If some are missing we have a problem (keep order for the message,
      # otherwise we could use set logic)
      missing = [name for name in want_names if name not in found_names]
      if missing:
          if found_names:  # found some but not all: warn
              warn(
                  f"Incomplete {ch_type} projector, "
                  f"missing channel(s) {missing}"
              )
          return False
      return True
  
imports: import re
  from copy import deepcopy
  from itertools import count
  import numpy
  from ..defaults import _BORDER_DEFAULT, _EXTRAPOLATE_DEFAULT, _INTERPOLATION_DEFAULT
  from ..fixes import _safe_svd
  from ..utils import _check_option, _validate_type, fill_doc, logger, object_diff, verbose, warn
  from .constants import FIFF
  from .pick import _ELECTRODE_CH_TYPES, _electrode_types, pick_info, pick_types
  from .tag import _rename_list, find_tag
  from .tree import dir_tree_find
  from .write import _safe_name_list, end_block, start_block, write_float, write_float_matrix, write_int, write_name_list_sanitized, write_string
label_desc: Use image node_id 12 for calling a global function with example usage: _has_eeg_average_ref_proj(info) and returns: True, False, False