docstr: Calculate cosine similarity between a context and retrieved context embedding
docstr_tok: ["Calculate","cosine","similarity","between","a","context","and","retrieved","context","embedding"]
code: def _calculate_cosine_similarity(
      gt_embeddings: List[float], test_embeddings: List[float]
  ) -> float:
      """Calculate cosine similarity between a context and retrieved context embedding"""
      cosine_sim = 1 - distance.cosine(gt_embeddings, test_embeddings)
  
      return cosine_sim
  
imports: import ast
  from collections import defaultdict
  from typing import List
  import nltk
  import pandas
  from nltk import word_tokenize
  from nltk.translate.bleu_score import sentence_bleu
  from nltk.translate.meteor_score import meteor_score
  from rouge_score import rouge_scorer
  from scipy.spatial import distance
  from mindsdb.integrations.handlers.writer_handler.settings import WriterHandlerParameters
  from mindsdb.utilities import log
label_desc: Use image node_id 11 for calling the WriterEvaluator obj's underlying member method code with example usage: obj._calculate_cosine_similarity(gt_embeddings, test_embeddings) and returns: cosine_sim