code: public static void writeSerializersAndConfigsWithResilience(
  			DataOutputView out,
  			List<Tuple2<TypeSerializer<?>, TypeSerializerSnapshot<?>>> serializersAndConfigs) throws IOException {
  
  		try (
  			ByteArrayOutputStreamWithPos bufferWithPos = new ByteArrayOutputStreamWithPos();
  			DataOutputViewStreamWrapper bufferWrapper = new DataOutputViewStreamWrapper(bufferWithPos)) {
  
  			out.writeInt(serializersAndConfigs.size());
  			for (Tuple2<TypeSerializer<?>, TypeSerializerSnapshot<?>> serAndConfSnapshot : serializersAndConfigs) {
  				out.writeInt(bufferWithPos.getPosition());
  				writeSerializer(bufferWrapper, serAndConfSnapshot.f0);
  
  				out.writeInt(bufferWithPos.getPosition());
  				TypeSerializerSnapshotSerializationUtil.writeSerializerSnapshot(
  					bufferWrapper, (TypeSerializerSnapshot) serAndConfSnapshot.f1, serAndConfSnapshot.f0);
  			}
  
  			out.writeInt(bufferWithPos.getPosition());
  			out.write(bufferWithPos.getBuf(), 0, bufferWithPos.getPosition());
  		}
  	}
docs: Write a list of serializers and their corresponding config snapshots to the provided
  data output view. This method writes in a fault tolerant way, so that when read again
  using {@link #readSerializersAndConfigsWithResilience(DataInputView, ClassLoader)}, if
  deserialization of the serializer fails, its configuration snapshot will remain intact.
  
  <p>Specifically, all written serializers and their config snapshots are indexed by their
  offset positions within the serialized bytes. The serialization format is as follows:
  <ul>
  <li>1. number of serializer and configuration snapshot pairs.</li>
  <li>2. offsets of each serializer and configuration snapshot, in order.</li>
  <li>3. total number of bytes for the serialized serializers and the config snapshots.</li>
  <li>4. serialized serializers and the config snapshots.</li>
  </ul>
  
  @param out the data output view.
  @param serializersAndConfigs serializer and configuration snapshot pairs
  
  @throws IOException