code: def dominant(expr, n):
      """Finds the dominant term in a sum, that is a term that dominates
      every other term.
  
      Explanation
      ===========
  
      If limit(a/b, n, oo) is oo then a dominates b.
      If limit(a/b, n, oo) is 0 then b dominates a.
      Otherwise, a and b are comparable.
  
      If there is no unique dominant term, then returns ``None``.
  
      Examples
      ========
  
      >>> from sympy import Sum
      >>> from sympy.series.limitseq import dominant
      >>> from sympy.abc import n, k
      >>> dominant(5*n**3 + 4*n**2 + n + 1, n)
      5*n**3
      >>> dominant(2**n + Sum(k, (k, 0, n)), n)
      2**n
  
      See Also
      ========
  
      sympy.series.limitseq.dominant
      """
      terms = Add.make_args(expr.expand(func=True))
      term0 = terms[-1]
      comp = [term0]  # comparable terms
      for t in terms[:-1]:
          r = term0 / t
          e = r.gammasimp()
          if e == r:
              e = r.factor()
          l = limit_seq(e, n)
          if l is None:
              return None
          elif l.is_zero:
              term0 = t
              comp = [term0]
          elif l not in [S.Infinity, S.NegativeInfinity]:
              comp.append(t)
      if len(comp) > 1:
          return None
      return term0
  
file_path: sympy/sympy/series/limitseq.py
imports: from sympy.calculus.accumulationbounds import AccumulationBounds
  from sympy.core.add import Add
  from sympy.core.function import PoleError
  from sympy.core.power import Pow
  from sympy.core.singleton import S
  from sympy.core.symbol import Dummy
  from sympy.core.sympify import sympify
  from sympy.functions.combinatorial.numbers import fibonacci
  from sympy.functions.combinatorial.factorials import factorial, subfactorial
  from sympy.functions.special.gamma_functions import gamma
  from sympy.functions.elementary.complexes import Abs
  from sympy.functions.elementary.miscellaneous import Max, Min
  from sympy.functions.elementary.trigonometric import cos, sin
  from sympy.series.limits import Limit
label_desc: Use image node_id 2 for calling a global function with example usage: dominant(expr, n) and returns: term0, None, None