code: def _remove_right_units(string: str) -> str:
      """Source: https://github.com/hendrycks/math
  
      Remove units (on the right).
      "\\text{ " only ever occurs (at least in the val set) when describing units.
      """
      if "\\text{ " in string:
          splits = string.split("\\text{ ")
          assert len(splits) == 2
          return splits[0]
      else:
          return string
  
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 5 for calling a global function with example usage: _remove_right_units(string) and returns: splits, string