code: def _write_proc_history(fid, info):
      """Write processing history to file."""
      if len(info["proc_history"]) > 0:
          start_block(fid, FIFF.FIFFB_PROCESSING_HISTORY)
          for record in info["proc_history"]:
              start_block(fid, FIFF.FIFFB_PROCESSING_RECORD)
              for key, id_, writer in zip(
                  _proc_keys, _proc_ids, _proc_writers
              ):
                  if key in record:
                      writer(fid, id_, record[key])
              _write_maxfilter_record(fid, record["max_info"])
              if "ias" in record:
                  for _ in record["ias"]:
                      start_block(fid, FIFF.FIFFB_IAS)
                      # XXX should eventually populate this
                      end_block(fid, FIFF.FIFFB_IAS)
              end_block(fid, FIFF.FIFFB_PROCESSING_RECORD)
          end_block(fid, FIFF.FIFFB_PROCESSING_HISTORY)
  
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 2 for calling a global function with example usage: _write_proc_history(fid, info) without return types