code: def unpack_messages(msgs):
          import msgpack
          
  
          for key, msg in msgs:
              record = msgpack.unpackb(msg)
              record['_key'] = key
              yield record
docs: Deserialize a message to python structures