code: def test_ei():
      assert Ei(0) is S.NegativeInfinity
      assert Ei(oo) is S.Infinity
      assert Ei(-oo) is S.Zero
  
      assert tn_branch(Ei)
      assert mytd(Ei(x), exp(x) / x, x)
      assert mytn(
          Ei(x),
          Ei(x).rewrite(uppergamma),
          -uppergamma(0, x * polar_lift(-1)) - I * pi,
          x,
      )
      assert mytn(
          Ei(x),
          Ei(x).rewrite(expint),
          -expint(1, x * polar_lift(-1)) - I * pi,
          x,
      )
      assert Ei(x).rewrite(expint).rewrite(Ei) == Ei(x)
      assert Ei(x * exp_polar(2 * I * pi)) == Ei(x) + 2 * I * pi
      assert Ei(x * exp_polar(-2 * I * pi)) == Ei(x) - 2 * I * pi
  
      assert mytn(Ei(x), Ei(x).rewrite(Shi), Chi(x) + Shi(x), x)
      assert mytn(
          Ei(x * polar_lift(I)),
          Ei(x * polar_lift(I)).rewrite(Si),
          Ci(x) + I * Si(x) + I * pi / 2,
          x,
      )
  
      assert Ei(log(x)).rewrite(li) == li(x)
      assert Ei(2 * log(x)).rewrite(li) == li(x**2)
  
      assert gruntz(Ei(x + exp(-x)) * exp(-x) * x, x, oo) == 1
  
      assert Ei(x).series(x) == EulerGamma + log(
          x
      ) + x + x**2 / 4 + x**3 / 18 + x**4 / 96 + x**5 / 600 + O(
          x**6
      )
      assert Ei(x).series(x, 1, 3) == Ei(1) + E * (x - 1) + O(
          (x - 1) ** 3, (x, 1)
      )
      assert (
          Ei(x).series(x, oo)
          == (
              120 / x**5
              + 24 / x**4
              + 6 / x**3
              + 2 / x**2
              + 1 / x
              + 1
              + O(x ** (-6), (x, oo))
          )
          * exp(x)
          / x
      )
  
      assert str(Ei(cos(2)).evalf(n=10)) == "-0.6760647401"
      raises(ArgumentIndexError, lambda: Ei(x).fdiff(2))
  
imports: from sympy.core.function import diff, expand, expand_func
  from sympy.core import EulerGamma
  from sympy.core.numbers import E, Float, I, Rational, nan, oo, pi
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol, symbols
  from sympy.functions.elementary.complexes import conjugate, im, polar_lift, re
  from sympy.functions.elementary.exponential import exp, exp_polar, log
  from sympy.functions.elementary.hyperbolic import cosh, sinh
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.functions.elementary.trigonometric import cos, sin, sinc
  from sympy.functions.special.error_functions import Chi, Ci, E1, Ei, Li, Shi, Si, erf, erf2, erf2inv, erfc, erfcinv, erfi, erfinv, expint, fresnelc, fresnels, li
  from sympy.functions.special.gamma_functions import gamma, uppergamma
  from sympy.functions.special.hyper import hyper, meijerg
  from sympy.integrals.integrals import Integral, integrate
  from sympy.series.gruntz import gruntz
  from sympy.series.limits import limit
  from sympy.series.order import O
  from sympy.core.expr import unchanged
  from sympy.core.function import ArgumentIndexError
  from sympy.functions.special.error_functions import _erfs, _eis
  from sympy.testing.pytest import raises
label_desc: Use image node_id 19 for calling a global function with example usage: test_ei() without return types