code: def compare(a, b, x):
      """Returns "<" if a<b, "=" for a == b, ">" for a>b"""
      # log(exp(...)) must always be simplified here for termination
      la, lb = log(a), log(b)
      if isinstance(a, Basic) and (
          isinstance(a, exp) or (a.is_Pow and a.base == S.Exp1)
      ):
          la = a.exp
      if isinstance(b, Basic) and (
          isinstance(b, exp) or (b.is_Pow and b.base == S.Exp1)
      ):
          lb = b.exp
  
      c = limitinf(la / lb, x)
      if c == 0:
          return "<"
      elif c.is_infinite:
          return ">"
      else:
          return "="
  
imports: from functools import reduce
  from sympy.core import Basic, S, Mul, PoleError, expand_mul
  from sympy.core.cache import cacheit
  from sympy.core.intfunc import ilcm
  from sympy.core.numbers import I, oo
  from sympy.core.symbol import Dummy, Wild
  from sympy.core.traversal import bottom_up
  from sympy.functions import log, exp, sign
  from sympy.series.order import Order
  from sympy.utilities.exceptions import SymPyDeprecationWarning
  from sympy.utilities.misc import debug_decorator
  from sympy.utilities.timeutils import timethis
label_desc: Use image node_id 1 for calling a global function with example usage: compare(a, b, x) and returns: str, str, str