code: def limit(e, z, z0, dir="+"):
      """Computes the limit of ``e(z)`` at the point ``z0``.
  
      Parameters
      ==========
  
      e : expression, the limit of which is to be taken
  
      z : symbol representing the variable in the limit.
          Other symbols are treated as constants. Multivariate limits
          are not supported.
  
      z0 : the value toward which ``z`` tends. Can be any expression,
          including ``oo`` and ``-oo``.
  
      dir : string, optional (default: "+")
          The limit is bi-directional if ``dir="+-"``, from the right
          (z->z0+) if ``dir="+"``, and from the left (z->z0-) if
          ``dir="-"``. For infinite ``z0`` (``oo`` or ``-oo``), the ``dir``
          argument is determined from the direction of the infinity
          (i.e., ``dir="-"`` for ``oo``).
  
      Examples
      ========
  
      >>> from sympy import limit, sin, oo
      >>> from sympy.abc import x
      >>> limit(sin(x)/x, x, 0)
      1
      >>> limit(1/x, x, 0) # default dir='+'
      oo
      >>> limit(1/x, x, 0, dir="-")
      -oo
      >>> limit(1/x, x, 0, dir='+-')
      zoo
      >>> limit(1/x, x, oo)
      0
  
      Notes
      =====
  
      First we try some heuristics for easy and frequent cases like "x", "1/x",
      "x**2" and similar, so that it's fast. For all other cases, we use the
      Gruntz algorithm (see the gruntz() function).
  
      See Also
      ========
  
       limit_seq : returns the limit of a sequence.
      """
  
      return Limit(e, z, z0, dir).doit(deep=False)
  
file_path: sympy/sympy/series/limits.py
imports: from sympy.calculus.accumulationbounds import AccumBounds
  from sympy.core import S, Symbol, Add, sympify, Expr, PoleError, Mul
  from sympy.core.exprtools import factor_terms
  from sympy.core.numbers import Float, _illegal
  from sympy.functions.combinatorial.factorials import factorial
  from sympy.functions.elementary.complexes import Abs, sign, arg, re
  from sympy.functions.elementary.exponential import exp, log
  from sympy.functions.special.gamma_functions import gamma
  from sympy.polys import PolynomialError, factor
  from sympy.series.order import Order
  from .gruntz import gruntz
label_desc: Use image node_id 1 for calling a global function with example usage: limit(e, z, z0, dir) and returns: Limit