code: def convert_relation(rel):
      if rel.expr():
          return convert_expr(rel.expr())
  
      lh = convert_relation(rel.relation(0))
      rh = convert_relation(rel.relation(1))
      if rel.LT():
          return sympy.StrictLessThan(lh, rh)
      elif rel.LTE():
          return sympy.LessThan(lh, rh)
      elif rel.GT():
          return sympy.StrictGreaterThan(lh, rh)
      elif rel.GTE():
          return sympy.GreaterThan(lh, rh)
      elif rel.EQUAL():
          return sympy.Eq(lh, rh)
      elif rel.NEQ():
          return sympy.Ne(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 2 for calling a global function with example usage: convert_relation(rel) and returns: convert_expr, sympy, sympy, sympy, sympy, sympy, sympy