code: def _read_proc_history(fid, tree):
      """Read processing history from fiff file.
  
      This function reads the SSS info, the CTC correction and the
      calibaraions from the SSS processing logs inside af a raw file
      (C.f. Maxfilter v2.2 manual (October 2010), page 21)::
  
          104 = {                 900 = proc. history
            104 = {               901 = proc. record
              103 = block ID
              204 = date
              212 = scientist
              113 = creator program
              104 = {             502 = SSS info
                264 = SSS task
                263 = SSS coord frame
                265 = SSS origin
                266 = SSS ins.order
                267 = SSS outs.order
                268 = SSS nr chnls
                269 = SSS components
                278 = SSS nfree
                243 = HPI g limit    0.98
                244 = HPI dist limit 0.005
              105 = }             502 = SSS info
              104 = {             504 = MaxST info
                264 = SSS task
                272 = SSST subspace correlation
                279 = SSST buffer length
              105 = }
              104 = {             501 = CTC correction
                103 = block ID
                204 = date
                113 = creator program
                800 = CTC matrix
                3417 = proj item chs
              105 = }             501 = CTC correction
              104 = {             503 = SSS finecalib.
                270 = SSS cal chnls
                271 = SSS cal coeff
              105 = }             503 = SSS finecalib.
            105 = }               901 = proc. record
          105 = }                 900 = proc. history
      """
      proc_history = dir_tree_find(tree, FIFF.FIFFB_PROCESSING_HISTORY)
      out = list()
      if len(proc_history) > 0:
          proc_history = proc_history[0]
          proc_records = dir_tree_find(
              proc_history, FIFF.FIFFB_PROCESSING_RECORD
          )
          for proc_record in proc_records:
              record = dict()
              for i_ent in range(proc_record["nent"]):
                  kind = proc_record["directory"][i_ent].kind
                  pos = proc_record["directory"][i_ent].pos
                  for key, id_, cast in zip(
                      _proc_keys, _proc_ids, _proc_casters
                  ):
                      if kind == id_:
                          tag = read_tag(fid, pos)
                          record[key] = cast(tag.data)
                          break
                  else:
                      warn("Unknown processing history item %s" % kind)
              record["max_info"] = _read_maxfilter_record(
                  fid, proc_record
              )
              iass = dir_tree_find(proc_record, FIFF.FIFFB_IAS)
              if len(iass) > 0:
                  # XXX should eventually populate this
                  ss = [dict() for _ in range(len(iass))]
                  record["ias"] = ss
              if len(record["max_info"]) > 0:
                  out.append(record)
      return out
  
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 1 for calling a global function with example usage: _read_proc_history(fid, tree) and returns: out