code: static <IN, BucketID> Bucket<IN, BucketID> restore(
  			final RecoverableWriter fsWriter,
  			final int subtaskIndex,
  			final long initialPartCounter,
  			final PartFileWriter.PartFileFactory<IN, BucketID> partFileFactory,
  			final RollingPolicy<IN, BucketID> rollingPolicy,
  			final BucketState<BucketID> bucketState) throws IOException {
  		return new Bucket<>(fsWriter, subtaskIndex, initialPartCounter, partFileFactory, rollingPolicy, bucketState);
  	}
docs: Restores a {@code Bucket} from the state included in the provided {@link BucketState}.
  @param fsWriter the filesystem-specific {@link RecoverableWriter}.
  @param subtaskIndex the index of the subtask creating the bucket.
  @param initialPartCounter the initial counter for the part files of the bucket.
  @param partFileFactory the {@link PartFileWriter.PartFileFactory} the factory creating part file writers.
  @param bucketState the initial state of the restored bucket.
  @param <IN> the type of input elements to the sink.
  @param <BucketID> the type of the identifier of the bucket, as returned by the {@link BucketAssigner}
  @return The restored Bucket.