code: def setup_proj(
      info,
      add_eeg_ref=True,
      activate=True,
      *,
      eeg_ref_ch_type="eeg",
      verbose=None,
  ):
      """Set up projection for Raw and Epochs.
  
      Parameters
      ----------
      %(info_not_none)s Warning: will be modified in-place.
      add_eeg_ref : bool
          If True, an EEG average reference will be added (unless one
          already exists).
      activate : bool
          If True projections are activated.
      eeg_ref_ch_type : str
          The channel type to use for reference projection.
          Valid types are 'eeg', 'ecog', 'seeg' and 'dbs'.
  
          .. versionadded:: 1.2
      %(verbose)s
  
      Returns
      -------
      projector : array of shape [n_channels, n_channels]
          The projection operator to apply to the data.
      info : mne.Info
          The modified measurement info.
      """
      # Add EEG ref reference proj if necessary
      if add_eeg_ref and _needs_eeg_average_ref_proj(info):
          eeg_proj = make_eeg_average_ref_proj(
              info, activate=activate, ch_type=eeg_ref_ch_type
          )
          info["projs"].append(eeg_proj)
  
      # Create the projector
      projector, nproj = make_projector_info(info)
      if nproj == 0:
          if verbose:
              logger.info(
                  "The projection vectors do not apply to these "
                  "channels"
              )
          projector = None
      else:
          logger.info(
              "Created an SSP operator (subspace dimension = %d)"
              % nproj
          )
  
      # The projection items have been activated
      if activate:
          with info._unlock():
              info["projs"] = activate_proj(info["projs"], copy=False)
  
      return projector, info
  
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 14 for calling a global function with example usage: setup_proj(info, add_eeg_ref, activate) and returns: projector,  info