def parse_tex(self, text: str, time_limit: int = 5) -> sympy.Basic:
        """
        Wrapper around `sympy.parse_text` that outputs a SymPy expression.
        Typically, you want to apply `normalize_text` as a preprocessing step.
        """
        try:
            with timeout(seconds=time_limit):
                parsed = parse_latex(text)
        except (
                # general error handling: there is a long tail of possible sympy/other
                # errors we would like to catch
                Exception
        ) as e:
            print(f"failed to parse {text} with exception {e}")
            return None

        return parsed

        Wrapper around `sympy.parse_text` that outputs a SymPy expression.
        Typically, you want to apply `normalize_text` as a preprocessing step.
        
PFPO/data/deepseek_math_utils/ocwcourses_eval_utils.py