public synchronized Collection<EmbeddingProjection> removeEmbeddingsBySubjectName(String subjectName) {
        // not efficient at ALL! review current approach!

        final List<EmbeddingProjection> toRemove = projection2Index.keySet().stream()
                .filter(projection -> projection.subjectName().equals(subjectName))
                .toList();

        toRemove.forEach(this::removeEmbedding); // <- rethink

        return toRemove;
    }
NOTE: current method returns COPY! Each time you invoke it, memory consumed, be careful!

@return copy of underlying embeddings array.
java/api/src/main/java/com/exadel/frs/core/trainservice/cache/EmbeddingCollection.java