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{ ")
          if not len(splits) == 2:
              raise AssertionError
          return splits[0]
      else:
          return string
  
file_path: autogen/autogen/math_utils.py
imports: from typing import Optional
  from autogen import oai, DEFAULT_MODEL
label_desc: Use image node_id 6 for calling a global function with example usage: _remove_right_units(string) and returns: splits, string