code: def extract_answer(completion):
      match1 = re.findall(ans_re1, completion)
      match2 = re.findall(ans_re2, completion)
      ans = []
      if match1:
          match_str1 = get_match_str(match1, -1)
          ans.append(match_str1)
      if match2:
          match_str2 = get_match_str(match2, -1).replace("$", "")
          ans.append(match_str2)
  
      answer = INVALID_ANS
      try:
          if len(ans) > 0:
              answer = eval(ans[-1])
      except Exception as e:
          print(e)
          return answer
      return answer
  
imports: import difflib
  import re
  import string
  from collections import Counter
  import jieba
  from fuzzywuzzy import fuzz
  from rouge import Rouge
label_desc: Use image node_id 26 for calling a global function with example usage: extract_answer(completion) and returns: answer, answer