code: def do_subs(expr, at):
      if at.expr():
          at_expr = convert_expr(at.expr())
          syms = at_expr.atoms(sympy.Symbol)
          if len(syms) == 0:
              return expr
          elif len(syms) > 0:
              sym = next(iter(syms))
              return expr.subs(sym, at_expr)
      elif at.equality():
          lh = convert_expr(at.equality().expr(0))
          rh = convert_expr(at.equality().expr(1))
          return expr.subs(lh, rh)
  
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 8 for calling a global function with example usage: do_subs(expr, at) and returns: expr, expr, expr