@Override
    public Tensor evaluate(EvaluationContext<NAMETYPE> context) {
        Tensor tensor = argument.evaluate(context);
        TensorType resultType = resultType(tensor.type());

        PartialAddress subspaceAddress = subspaceToAddress(tensor.type(), context);
        if (resultType.rank() == 0) { // shortcut common case
            return Tensor.from(tensor.get(subspaceAddress.asAddress(tensor.type())));
        }

        Tensor.Builder b = Tensor.Builder.of(resultType);
        for (Iterator<Tensor.Cell> i = tensor.cellIterator(); i.hasNext(); ) {
            Tensor.Cell cell = i.next();
            if (matches(subspaceAddress, cell.getKey(), tensor.type()))
                b.cell(remaining(resultType, cell.getKey(), tensor.type()), cell.getValue());
        }
        return b.build();
    }
Creates a value function

@param argument the tensor to return a cell value from
@param subspaceAddress a description of the address of the cell to return the value of. This is not a TensorAddress
                       because those require a type, but a type is not resolved until this is evaluated
vespajlib/src/main/java/com/yahoo/tensor/functions/Slice.java