code: public static NDArrayMessageChunk fromBuffer(ByteBuffer byteBuffer, NDArrayMessage.MessageType type) {
          int numChunks = byteBuffer.getInt();
          int chunkSize = byteBuffer.getInt();
          int idLength = byteBuffer.getInt();
          byte[] id = new byte[idLength];
          byteBuffer.get(id);
          String idString = new String(id);
          int index = byteBuffer.getInt();
          ByteBuffer firstData = byteBuffer.slice();
          NDArrayMessageChunk chunk = NDArrayMessageChunk.builder().chunkSize(chunkSize).numChunks(numChunks)
                          .data(firstData).messageType(type).id(idString).chunkIndex(index).build();
          return chunk;
  
      }
docs: Returns a chunk given the passed in {@link ByteBuffer}
  NOTE THAT THIS WILL MODIFY THE PASSED IN BYTEBUFFER's POSITION.
  
  @param byteBuffer the byte buffer to extract the chunk from
  @return the ndarray message chunk based on the passed in {@link ByteBuffer}