code: def consume(fmt, data, names):
      
      size = struct.calcsize(fmt)
      return named(struct.unpack(fmt, data[:size]), names), data[size:]
docs: Parses the struct defined by `fmt` from `data`, stores the parsed fields
      into a named tuple using `names`. Returns the named tuple, and the data
      with the struct stripped off.