code: def _write_maxfilter_record(fid, record):
      """Write maxfilter processing record to file."""
      sss_info = record["sss_info"]
      if len(sss_info) > 0:
          start_block(fid, FIFF.FIFFB_SSS_INFO)
          for key, id_, writer in zip(
              _sss_info_keys, _sss_info_ids, _sss_info_writers
          ):
              if key in sss_info:
                  writer(fid, id_, sss_info[key])
          end_block(fid, FIFF.FIFFB_SSS_INFO)
  
      max_st = record["max_st"]
      if len(max_st) > 0:
          start_block(fid, FIFF.FIFFB_SSS_ST_INFO)
          for key, id_, writer in zip(
              _max_st_keys, _max_st_ids, _max_st_writers
          ):
              if key in max_st:
                  writer(fid, id_, max_st[key])
          end_block(fid, FIFF.FIFFB_SSS_ST_INFO)
  
      sss_ctc = record["sss_ctc"]
      if len(sss_ctc) > 0:  # dict has entries
          start_block(fid, FIFF.FIFFB_CHANNEL_DECOUPLER)
          for key, id_, writer in zip(
              _sss_ctc_keys, _sss_ctc_ids, _sss_ctc_writers
          ):
              if key in sss_ctc:
                  writer(fid, id_, sss_ctc[key])
          if "proj_items_chs" in sss_ctc:
              write_name_list_sanitized(
                  fid,
                  FIFF.FIFF_PROJ_ITEM_CH_NAME_LIST,
                  sss_ctc["proj_items_chs"],
                  "proj_items_chs",
              )
          end_block(fid, FIFF.FIFFB_CHANNEL_DECOUPLER)
  
      sss_cal = record["sss_cal"]
      if len(sss_cal) > 0:
          start_block(fid, FIFF.FIFFB_SSS_CAL)
          for key, id_, writer in zip(
              _sss_cal_keys, _sss_cal_ids, _sss_cal_writers
          ):
              if key in sss_cal:
                  writer(fid, id_, sss_cal[key])
          end_block(fid, FIFF.FIFFB_SSS_CAL)
  
file_path: mne-python/mne/_fiff/proc_history.py
imports: import numpy
  from ..fixes import _csc_matrix_cast
  from ..utils import _check_fname, warn
  from .constants import FIFF
  from .open import fiff_open, read_tag
  from .tag import _float_item, _int_item, find_tag
  from .tree import dir_tree_find
  from .write import _safe_name_list, end_block, start_block, write_float, write_float_matrix, write_float_sparse, write_id, write_int, write_int_matrix, write_name_list_sanitized, write_string
label_desc: Use image node_id 5 for calling a global function with example usage: _write_maxfilter_record(fid, record) without return types