code: @Override
      public NDArrayMessage reassemble(String id) {
          List<NDArrayMessageChunk> chunkList = chunks.get(id);
          if (chunkList.size() != chunkList.get(0).getNumChunks())
              throw new IllegalStateException("Unable to reassemble message chunk " + id + " missing "
                              + (chunkList.get(0).getNumChunks() - chunkList.size()) + "chunks");
          //ensure the chunks are in contiguous ordering according to their chunk index
          NDArrayMessageChunk[] inOrder = new NDArrayMessageChunk[chunkList.size()];
          for (NDArrayMessageChunk chunk : chunkList) {
              inOrder[chunk.getChunkIndex()] = chunk;
          }
  
          //reassemble the in order chunks
          NDArrayMessage message = NDArrayMessage.fromChunks(inOrder);
          chunkList.clear();
          chunks.remove(id);
          return message;
  
      }
docs: Reassemble an ndarray message
  from a set of chunks
  
  Note that once reassemble is called,
  the associated chunk lists will automatically
  be removed from storage.
  
  
  @param id the id to reassemble
  @return the reassembled message