code: def _fix_sqrt(string: str) -> str:
      """Source: https://github.com/hendrycks/math
      Reformat square roots.
      Example:
      >>> _fix_sqrt("\\sqrt3")
      \\sqrt{3}
      """
      if "\\sqrt" not in string:
          return string
      splits = string.split("\\sqrt")
      new_string = splits[0]
      for split in splits[1:]:
          if split[0] != "{":
              a = split[0]
              new_substr = "\\sqrt{" + a + "}" + split[1:]
          else:
              new_substr = "\\sqrt" + split
          new_string += new_substr
      return new_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 7 for calling a global function with example usage: _fix_sqrt(string) and returns: new_string, string