code: def remove_boxed(string: str) -> Optional[str]:
      """Source: https://github.com/hendrycks/math
  
      Extract the text within a \\boxed{...} environment.
  
      Example:
      >>> remove_boxed(\\boxed{\\frac{2}{3}})
      \\frac{2}{3}
      """
      left = "\\boxed{"
      try:
          assert string[: len(left)] == left
          assert string[-1] == "}"
          return string[len(left) : -1]
      except Exception:
          return None
  
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 1 for calling a global function with example usage: remove_boxed(string) and returns: string, None