code: def unpack(s):
      """Unpack a MXImageRecord to string.
  
      Parameters
      ----------
      s : str
          String buffer from ``MXRecordIO.read``.
  
      Returns
      -------
      header : IRHeader
          Header of the image record.
      s : str
          Unpacked string.
  
      Examples
      --------
      >>> record = mx.recordio.MXRecordIO('test.rec', 'r')
      >>> item = record.read()
      >>> header, s = mx.recordio.unpack(item)
      >>> header
      HEADER(flag=0, label=14.0, id=20129312, id2=0)
      """
      header = IRHeader(*struct.unpack(_IR_FORMAT, s[:_IR_SIZE]))
      s = s[_IR_SIZE:]
      if header.flag > 0:
          header = header._replace(
              label=np.frombuffer(s, np.float32, header.flag)
          )
          s = s[header.flag * 4 :]
      return header, s
  
imports: from collections import namedtuple
  from multiprocessing import current_process
  import ctypes
  import struct
  import numbers
  import numpy
  from .base import _LIB
  from .base import RecordIOHandle
  from .base import check_call
  from .base import c_str
label_desc: Use image node_id 2 for calling a global function with example usage: unpack(s) and returns: header,  s