code: def fix_mag_coil_types(info, use_cal=False):
      """Fix magnetometer coil types.
  
      Parameters
      ----------
      %(info_not_none)s Corrections are done in-place.
      use_cal : bool
          If True, further refine the check for old coil types by checking
          ``info['chs'][ii]['cal']``.
  
      Notes
      -----
      This function changes magnetometer coil types 3022 (T1: SQ20483N) and
      3023 (T2: SQ20483-A) to 3024 (T3: SQ20950N) in the channel definition
      records in the info structure.
  
      Neuromag Vectorview systems can contain magnetometers with two
      different coil sizes (3022 and 3023 vs. 3024). The systems
      incorporating coils of type 3024 were introduced last and are used at
      the majority of MEG sites. At some sites with 3024 magnetometers,
      the data files have still defined the magnetometers to be of type
      3022 to ensure compatibility with older versions of Neuromag software.
      In the MNE software as well as in the present version of Neuromag
      software coil type 3024 is fully supported. Therefore, it is now safe
      to upgrade the data files to use the true coil type.
  
      .. note:: The effect of the difference between the coil sizes on the
                current estimates computed by the MNE software is very small.
                Therefore the use of ``fix_mag_coil_types`` is not mandatory.
      """
      old_mag_inds = _get_T1T2_mag_inds(info, use_cal)
  
      for ii in old_mag_inds:
          info["chs"][ii]["coil_type"] = FIFF.FIFFV_COIL_VV_MAG_T3
      logger.info(
          "%d of %d magnetometer types replaced with T3."
          % (
              len(old_mag_inds),
              len(pick_types(info, meg="mag", exclude=[])),
          )
      )
      info._check_consistency()
  
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 11 for calling a global function with example usage: fix_mag_coil_types(info, use_cal) without return types