private static Pair<TensorType, TensorAddress> readFirstTensorAddress(TokenBuffer buffer, TensorType sparseType, TensorType originalType) {
        var typeBuilder = new TensorType.Builder(sparseType.valueType());
        var rawAddress = new HashMap<String, String>();
        expectObjectStart(buffer.current());
        int initNesting = buffer.nesting();
        for (buffer.next(); buffer.nesting() >= initNesting; buffer.next()) {
            var elem = readRawElement(buffer, sparseType, originalType);
            var dimension = sparseType.dimension(elem.getFirst());
            if (dimension.isPresent()) {
               typeBuilder.dimension(dimension.get());
               rawAddress.put(elem.getFirst(), elem.getSecond());
            } else {
                throw new IllegalArgumentException(originalType + " does not contain dimension '" + elem.getFirst() + "'");
            }
        }
        expectObjectEnd(buffer.current());
        var type = typeBuilder.build();
        var builder = new TensorAddress.Builder(type);
        rawAddress.forEach((dimension, label) -> builder.add(dimension, label));
        return new Pair<>(type, builder.build());
    }
Reads the first raw tensor address from the given buffer and resolves and returns the tensor type and tensor address based on this.
The resulting tensor type contains a subset or all of the dimensions from the given sparseType.
document/src/main/java/com/yahoo/document/json/readers/TensorRemoveUpdateReader.java