private static Tensor readRemoveUpdateTensor(TokenBuffer buffer, TensorType sparseType, TensorType originalType) {
        Tensor.Builder builder = null;
        expectObjectStart(buffer.current());
        int initNesting = buffer.nesting();
        for (buffer.next(); buffer.nesting() >= initNesting; buffer.next()) {
            if (TENSOR_ADDRESSES.equals(buffer.currentName())) {
                expectArrayStart(buffer.current());
                int nesting = buffer.nesting();
                for (buffer.next(); buffer.nesting() >= nesting; buffer.next()) {
                    if (builder == null) {
                        var typeAndAddress = readFirstTensorAddress(buffer, sparseType, originalType);
                        builder = Tensor.Builder.of(typeAndAddress.getFirst());
                        builder.cell(typeAndAddress.getSecond(), 1.0);
                    } else {
                        builder.cell(readTensorAddress(buffer, builder.type(), originalType), 1.0);
                    }
                }
                expectCompositeEnd(buffer.current());
            }
        }
        expectObjectEnd(buffer.current());
        return (builder != null) ? builder.build() : Tensor.Builder.of(sparseType).build();
    }
Reads all addresses in buffer and returns a tensor where addresses have cell value 1.0
document/src/main/java/com/yahoo/document/json/readers/TensorRemoveUpdateReader.java