code: public static int sizeForMessage(NDArrayMessageChunk chunk) {
          int messageTypeSize = 4;
          int indexSize = 4;
          int numChunksSize = 4;
          int chunkSizeSize = 4;
          int idLengthSize = 4;
          return idLengthSize + messageTypeSize + indexSize + chunkSizeSize + numChunksSize + chunk.getData().limit()
                          + chunk.getId().getBytes().length;
  
      }
docs: Returns the overall size for an {@link NDArrayMessageChunk}.
  The size of a message chunk is:
  idLengthSize(4) + messageTypeSize(4) + indexSize(4) + chunkSizeSize(4) +  numChunksSize(4) + chunk.getData().limit() + chunk.getId().getBytes().length
  Many of these are flat out integers and are mainly variables for accounting purposes and ease of readbility
  @param chunk the size of a message chunk
  @return the size of an {@link ByteBuffer} for the given {@link NDArrayMessageChunk}