public Label getOrCreateLabel(long numeric) {
        // Positive numeric labels are indexes.
        // They are not cached, but rather pre-computed for small values or created on demand.
        if (numeric >= 0) {
            if (numeric < smallIndex.length) {
                return smallIndex[(int) numeric];
            }

            return new LabelImpl(numeric);
        }

        if (numeric == INVALID_INDEX_LABEL.asNumeric()) {
            return INVALID_INDEX_LABEL;
        }

        // Negative numeric labels are mapped to string labels.
        var existingLabel = getLabel(numeric);

        if (existingLabel != null) {
            return existingLabel;
        }

        throw new IllegalArgumentException("No negative numeric label " + numeric);
    }
Creates a label cache.

@param lockStripes number of lock stripes, should be proportional to the number of threads using the cache.
@param smallIndexSize size of a cache used to store pre-computed labels for small index labels.
vespajlib/src/main/java/com/yahoo/tensor/impl/LabelCache.java