docstr: Get reference answers for each question in the dataframe
docstr_tok: ["Get","reference","answers","for","each","question","in","the","dataframe"]
code: def extract_reference_answers(df: pd.DataFrame) -> List[str]:
      """Get reference answers for each question in the dataframe"""
  
      # todo: this is a hack, we need to fix this so it works with multiple answers ie top_k>1
      answers = df["answers"].tolist()
      extracted_answers = []
  
      for answer in answers:
          try:
              extracted_answers.append(
                  ast.literal_eval(answer)["text"][0]
              )
          except IndexError as e:
              logger.error(e)
              extracted_answers.append("")
              continue
  
      return extracted_answers
  
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 10 for calling the WriterEvaluator obj's underlying member method code with example usage: obj.extract_reference_answers(df) and returns: extracted_answers