code: def _unpack_matrix(fid, rows, cols, dtype, out_dtype):
      """Unpack matrix."""
      dtype = np.dtype(dtype)
  
      string = fid.read(int(dtype.itemsize * rows * cols))
      out = (
          np.frombuffer(string, dtype=dtype)
          .reshape(rows, cols)
          .astype(out_dtype)
      )
      return out
  
imports: import numpy
  from ..._fiff.utils import read_str
label_desc: Use image node_id 1 for calling a global function with example usage: _unpack_matrix(fid, rows, cols, dtype, out_dtype) and returns: out