code: public static <T> ArrayDeque<Tuple2<Long, Set<T>>> toDeque(
  			SerializedCheckpointData[] data,
  			TypeSerializer<T> serializer) throws IOException {
  
  		ArrayDeque<Tuple2<Long, Set<T>>> deque = new ArrayDeque<>(data.length);
  		DataInputDeserializer deser = null;
  
  		for (SerializedCheckpointData checkpoint : data) {
  			byte[] serializedData = checkpoint.getSerializedData();
  			if (deser == null) {
  				deser = new DataInputDeserializer(serializedData, 0, serializedData.length);
  			}
  			else {
  				deser.setBuffer(serializedData);
  			}
  
  			final Set<T> ids = new HashSet<>(checkpoint.getNumIds());
  			final int numIds = checkpoint.getNumIds();
  
  			for (int i = 0; i < numIds; i++) {
  				ids.add(serializer.deserialize(deser));
  			}
  
  			deque.addLast(new Tuple2<Long, Set<T>>(checkpoint.checkpointId, ids));
  		}
  
  		return deque;
  	}
docs: De-serializes an array of SerializedCheckpointData back into an ArrayDeque of element checkpoints.
  
  @param data The data to be deserialized.
  @param serializer The serializer used to deserialize the data.
  @param <T> The type of the elements.
  @return An ArrayDeque of element checkpoints.
  
  @throws IOException Thrown, if the serialization fails.