code: def equalize_channels(instances, copy=True, verbose=None):
      """Equalize channel picks and ordering across multiple MNE-Python objects.
  
      First, all channels that are not common to each object are dropped. Then,
      using the first object in the list as a template, the channels of each
      object are re-ordered to match the template. The end result is that all
      given objects define the same channels, in the same order.
  
      Parameters
      ----------
      instances : list
          A list of MNE-Python objects to equalize the channels for. Objects can
          be of type Raw, Epochs, Evoked, AverageTFR, Forward, Covariance,
          CrossSpectralDensity or Info.
      copy : bool
          When dropping and/or re-ordering channels, an object will be copied
          when this parameter is set to ``True``. When set to ``False`` (the
          default) the dropping and re-ordering of channels happens in-place.
  
          .. versionadded:: 0.20.0
      %(verbose)s
  
      Returns
      -------
      equalized_instances : list
          A list of MNE-Python objects that have the same channels defined in the
          same order.
  
      Notes
      -----
      This function operates inplace.
      """
      from ..cov import Covariance
      from ..epochs import BaseEpochs
      from ..evoked import Evoked
      from ..forward import Forward
      from ..io import BaseRaw
      from ..time_frequency import CrossSpectralDensity, _BaseTFR
  
      # Instances need to have a `ch_names` attribute and a `pick_channels`
      # method that supports `ordered=True`.
      allowed_types = (
          BaseRaw,
          BaseEpochs,
          Evoked,
          _BaseTFR,
          Forward,
          Covariance,
          CrossSpectralDensity,
          Info,
      )
      allowed_types_str = (
          "Raw, Epochs, Evoked, TFR, Forward, Covariance, "
          "CrossSpectralDensity or Info"
      )
      for inst in instances:
          _validate_type(
              inst,
              allowed_types,
              "Instances to be modified",
              allowed_types_str,
          )
  
      chan_template = instances[0].ch_names
      logger.info("Identifying common channels ...")
      channels = [set(inst.ch_names) for inst in instances]
      common_channels = set(chan_template).intersection(*channels)
      all_channels = set(chan_template).union(*channels)
      dropped = list(set(all_channels - common_channels))
  
      # Preserve the order of chan_template
      order = np.argsort(
          [chan_template.index(ch) for ch in common_channels]
      )
      common_channels = np.array(list(common_channels))[order].tolist()
  
      # Update all instances to match the common_channels list
      reordered = False
      equalized_instances = []
      for inst in instances:
          # Only perform picking when needed
          if inst.ch_names != common_channels:
              if isinstance(inst, Info):
                  sel = pick_channels(
                      inst.ch_names,
                      common_channels,
                      exclude=[],
                      ordered=True,
                  )
                  inst = pick_info(inst, sel, copy=copy, verbose=False)
              else:
                  if copy:
                      inst = inst.copy()
                  # TODO change to .pick() once CSD, Cov, and Fwd have `.pick()` methods
                  inst.pick_channels(common_channels, ordered=True)
              if len(inst.ch_names) == len(common_channels):
                  reordered = True
          equalized_instances.append(inst)
  
      if dropped:
          logger.info("Dropped the following channels:\n%s" % dropped)
      elif reordered:
          logger.info("Channels have been re-ordered.")
  
      return equalized_instances
  
imports: import os.path
  import string
  import sys
  from collections import OrderedDict
  from copy import deepcopy
  from dataclasses import dataclass
  from functools import partial
  from pathlib import Path
  from typing import Union
  import numpy
  from scipy.io import loadmat
  from scipy.sparse import csr_matrix, lil_matrix
  from scipy.spatial import Delaunay
  from scipy.stats import zscore
  from .._fiff.constants import FIFF
  from .._fiff.meas_info import Info, MontageMixin, _merge_info, _rename_comps, _unit2human, create_info
  from .._fiff.pick import _check_excludes_includes, _pick_data_channels, _picks_by_type, _picks_to_idx, _second_rules, channel_indices_by_type, channel_type, pick_channels, pick_info, pick_types
  from .._fiff.proj import setup_proj
  from .._fiff.reference import add_reference_channels, set_eeg_reference
  from .._fiff.tag import _rename_list
  from ..bem import _check_origin
  from ..defaults import HEAD_SIZE_DEFAULT, _handle_default
  from ..utils import _check_dict_keys, _check_fname, _check_option, _check_preload, _get_stim_channel, _on_missing, _validate_type, fill_doc, legacy, logger, verbose, warn
label_desc: Use image node_id 2 for calling a global function with example usage: equalize_channels(instances, copy, verbose) and returns: equalized_instances