docs: protected SnapshotWriter openWriter(SnapshotWriter writer, SnapshotDescriptor descriptor) {
      checkWriter();
      checkState(!descriptor.isLocked(), "cannot write to locked snapshot descriptor");
      this.writer = checkNotNull(writer, "writer cannot be null");
      return writer;
    }