code: def _setup_ext_proj(info, ext_order):
      meg_picks = pick_types(info, meg=True, eeg=False, exclude="bads")
      info = pick_info(_simplify_info(info), meg_picks)  # makes a copy
      _, _, _, _, mag_or_fine = _get_mf_picks_fix_mags(
          info,
          int_order=0,
          ext_order=ext_order,
          ignore_ref=True,
          verbose="error",
      )
      mf_coils = _prep_mf_coils(info, verbose="error")
      ext = _sss_basis(
          dict(
              origin=(0.0, 0.0, 0.0), int_order=0, ext_order=ext_order
          ),
          mf_coils,
      ).T
      out_removes = _regularize_out(0, 1, mag_or_fine, [])
      ext = ext[~np.isin(np.arange(len(ext)), out_removes)]
      ext = orth(ext.T).T
      assert ext.shape[1] == len(meg_picks)
      proj = Projection(
          kind=FIFF.FIFFV_PROJ_ITEM_HOMOG_FIELD,
          desc="SSS",
          active=False,
          data=dict(
              data=ext,
              ncol=info["nchan"],
              col_names=info["ch_names"],
              nrow=len(ext),
          ),
      )
      with info._unlock():
          info["projs"] = [proj]
      proj_op, _ = setup_proj(
          info,
          add_eeg_ref=False,
          activate=False,
          verbose=_verbose_safe_false(),
      )
      assert proj_op.shape == (len(meg_picks),) * 2
      return proj, proj_op, meg_picks
  
imports: import copy
  import itertools
  from functools import partial
  import numpy
  from scipy.linalg import orth
  from scipy.optimize import fmin_cobyla
  from scipy.spatial.distance import cdist
  from ._fiff.constants import FIFF
  from ._fiff.meas_info import Info, _simplify_info
  from ._fiff.pick import _picks_to_idx, pick_channels, pick_channels_regexp, pick_info, pick_types
  from ._fiff.proj import Projection, setup_proj
  from .channels.channels import _get_meg_system
  from .cov import compute_whitener, make_ad_hoc_cov
  from .dipole import _make_guesses
  from .event import find_events
  from .fixes import jit
  from .forward import _concatenate_coils, _create_meg_coils, _magnetic_dipole_field_vec
  from .io import BaseRaw
  from .io.ctf.trans import _make_ctf_coord_trans_set
  from .io.kit.constants import KIT
  from .io.kit.kit import RawKIT
  from .preprocessing.maxwell import _get_mf_picks_fix_mags, _prep_mf_coils, _regularize_out, _sss_basis
  from .transforms import _angle_between_quats, _fit_matched_points, _quat_to_affine, als_ras_trans, apply_trans, invert_transform, quat_to_rot, rot_to_quat
  from .utils import ProgressBar, _check_fname, _check_option, _on_missing, _pl, _validate_type, _verbose_safe_false, logger, use_log_level, verbose, warn
label_desc: Use image node_id 18 for calling a global function with example usage: _setup_ext_proj(info, ext_order) and returns: proj,  proj_op,  meg_picks