def add_embeddings_to_cache_by_figures(embeddings_by_indexes, data_for_nn):
    for current_embedding in embeddings_by_indexes:
        current_figure_id = data_for_nn[current_embedding['index']]['figure_id']
        g.figures2embeddings[current_figure_id] = current_embedding['embedding']
def add_embeddings_to_cache_by_figures(embeddings_by_indexes, data_for_nn):
    for current_embedding in embeddings_by_indexes:
        current_figure_id = data_for_nn[current_embedding['index']]['figure_id']
        g.figures2embeddings[current_figure_id] = current_embedding['embedding']