code: def convert_exp(exp):
      if hasattr(exp, "exp"):
          exp_nested = exp.exp()
      else:
          exp_nested = exp.exp_nofunc()
  
      if exp_nested:
          base = convert_exp(exp_nested)
          if isinstance(base, list):
              raise LaTeXParsingError(
                  "Cannot raise derivative to power"
              )
          if exp.atom():
              exponent = convert_atom(exp.atom())
          elif exp.expr():
              exponent = convert_expr(exp.expr())
          return sympy.Pow(base, exponent, evaluate=False)
      else:
          if hasattr(exp, "comp"):
              return convert_comp(exp.comp())
          else:
              return convert_comp(exp.comp_nofunc())
  
imports: from importlib.metadata import version
  import sympy
  from sympy.external import import_module
  from sympy.printing.str import StrPrinter
  from sympy.physics.quantum.state import Bra, Ket
  from .errors import LaTeXParsingError
label_desc: Use image node_id 10 for calling a global function with example usage: convert_exp(exp) and returns: sympy, convert_comp, convert_comp