code: def _read_maxfilter_record(fid, tree):
      """Read maxfilter processing record from file."""
      sss_info_block = dir_tree_find(tree, FIFF.FIFFB_SSS_INFO)  # 502
      sss_info = dict()
      if len(sss_info_block) > 0:
          sss_info_block = sss_info_block[0]
          for i_ent in range(sss_info_block["nent"]):
              kind = sss_info_block["directory"][i_ent].kind
              pos = sss_info_block["directory"][i_ent].pos
              for key, id_, cast in zip(
                  _sss_info_keys, _sss_info_ids, _sss_info_casters
              ):
                  if kind == id_:
                      tag = read_tag(fid, pos)
                      sss_info[key] = cast(tag.data)
                      break
  
      max_st_block = dir_tree_find(tree, FIFF.FIFFB_SSS_ST_INFO)  # 504
      max_st = dict()
      if len(max_st_block) > 0:
          max_st_block = max_st_block[0]
          for i_ent in range(max_st_block["nent"]):
              kind = max_st_block["directory"][i_ent].kind
              pos = max_st_block["directory"][i_ent].pos
              for key, id_, cast in zip(
                  _max_st_keys, _max_st_ids, _max_st_casters
              ):
                  if kind == id_:
                      tag = read_tag(fid, pos)
                      max_st[key] = cast(tag.data)
                      break
  
      sss_ctc_block = dir_tree_find(
          tree, FIFF.FIFFB_CHANNEL_DECOUPLER
      )  # 501
      sss_ctc = dict()
      if len(sss_ctc_block) > 0:
          sss_ctc_block = sss_ctc_block[0]
          for i_ent in range(sss_ctc_block["nent"]):
              kind = sss_ctc_block["directory"][i_ent].kind
              pos = sss_ctc_block["directory"][i_ent].pos
              for key, id_, cast in zip(
                  _sss_ctc_keys, _sss_ctc_ids, _sss_ctc_casters
              ):
                  if kind == id_:
                      tag = read_tag(fid, pos)
                      sss_ctc[key] = cast(tag.data)
                      break
              else:
                  if kind == FIFF.FIFF_PROJ_ITEM_CH_NAME_LIST:
                      tag = read_tag(fid, pos)
                      chs = _safe_name_list(
                          tag.data, "read", "proj_items_chs"
                      )
                      # This list can null chars in the last entry, e.g.:
                      # [..., 'MEG2642', 'MEG2643', 'MEG2641\x00 ... \x00']
                      chs[-1] = chs[-1].split("\x00")[0]
                      sss_ctc["proj_items_chs"] = chs
  
      sss_cal_block = dir_tree_find(tree, FIFF.FIFFB_SSS_CAL)  # 503
      sss_cal = dict()
      if len(sss_cal_block) > 0:
          sss_cal_block = sss_cal_block[0]
          for i_ent in range(sss_cal_block["nent"]):
              kind = sss_cal_block["directory"][i_ent].kind
              pos = sss_cal_block["directory"][i_ent].pos
              for key, id_, cast in zip(
                  _sss_cal_keys, _sss_cal_ids, _sss_cal_casters
              ):
                  if kind == id_:
                      tag = read_tag(fid, pos)
                      sss_cal[key] = cast(tag.data)
                      break
  
      max_info = dict(
          sss_info=sss_info,
          sss_ctc=sss_ctc,
          sss_cal=sss_cal,
          max_st=max_st,
      )
      return max_info
  
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 4 for calling a global function with example usage: _read_maxfilter_record(fid, tree) and returns: max_info