code: def get_answer(solution: Optional[str]) -> Optional[str]:
      if solution is None:
          return None
      last_boxed = last_boxed_only_string(solution)
      if last_boxed is None:
          return None
      answer = remove_boxed(last_boxed)
      if answer is None:
          return None
      return answer
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/scenarios/math_scenario.py
imports: import collections
  import typing
  from typing import Dict, List, Optional
  from datasets import load_dataset, DatasetDict
  from .scenario import Scenario, Instance, Reference, TRAIN_SPLIT, TEST_SPLIT, CORRECT_TAG, Input, Output
label_desc: Use image node_id 8 for calling a global function with example usage: get_answer(solution) and returns: answer, None, None, None