code: def __init__(
      self, args: WriterHandlerParameters, df: pd.DataFrame, rag
  ):
      self.args = args
      self.df = df
      self.rag = rag(self.args)
  
      self.metric_map = {
          "cosine_similarity": self.calculate_cosine_similarities,
          "accuracy": self.get_matches,
          "rouge": self.calculate_rouge,
          "bleu": self.calculate_bleu,
          "meteor": self.calculate_meteor,
      }
  
      self.retrieval_metrics = self.args.retrieval_evaluation_metrics
      self.generator_metrics = self.args.generation_evaluation_metrics
  
      self.mean_evaluation_metrics = defaultdict(list)
  
      if args.evaluation_type == "e2e":
          # todo check if this is fine for cloud, better to download once and load from disk
          nltk.download("wordnet")
  
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 1 to create a new WriterEvaluator object  with example: obj = WriterEvaluator(args, df, rag)