code: def test_expint():
      assert mytn(
          expint(x, y),
          expint(x, y).rewrite(uppergamma),
          y ** (x - 1) * uppergamma(1 - x, y),
          x,
      )
      assert mytd(
          expint(x, y),
          -(y ** (x - 1)) * meijerg([], [1, 1], [0, 0, 1 - x], [], y),
          x,
      )
      assert mytd(expint(x, y), -expint(x - 1, y), y)
      assert mytn(
          expint(1, x),
          expint(1, x).rewrite(Ei),
          -Ei(x * polar_lift(-1)) + I * pi,
          x,
      )
  
      assert (
          expint(-4, x)
          == exp(-x) / x
          + 4 * exp(-x) / x**2
          + 12 * exp(-x) / x**3
          + 24 * exp(-x) / x**4
          + 24 * exp(-x) / x**5
      )
      assert expint(Rational(-3, 2), x) == exp(-x) / x + 3 * exp(-x) / (
          2 * x**2
      ) + 3 * sqrt(pi) * erfc(sqrt(x)) / (4 * x ** S("5/2"))
  
      assert tn_branch(expint, 1)
      assert tn_branch(expint, 2)
      assert tn_branch(expint, 3)
      assert tn_branch(expint, 1.7)
      assert tn_branch(expint, pi)
  
      assert expint(y, x * exp_polar(2 * I * pi)) == x ** (y - 1) * (
          exp(2 * I * pi * y) - 1
      ) * gamma(-y + 1) + expint(y, x)
      assert expint(y, x * exp_polar(-2 * I * pi)) == x ** (y - 1) * (
          exp(-2 * I * pi * y) - 1
      ) * gamma(-y + 1) + expint(y, x)
      assert expint(
          2, x * exp_polar(2 * I * pi)
      ) == 2 * I * pi * x + expint(2, x)
      assert expint(
          2, x * exp_polar(-2 * I * pi)
      ) == -2 * I * pi * x + expint(2, x)
      assert expint(1, x).rewrite(Ei).rewrite(expint) == expint(1, x)
      assert expint(x, y).rewrite(Ei) == expint(x, y)
      assert expint(x, y).rewrite(Ci) == expint(x, y)
  
      assert mytn(E1(x), E1(x).rewrite(Shi), Shi(x) - Chi(x), x)
      assert mytn(
          E1(polar_lift(I) * x),
          E1(polar_lift(I) * x).rewrite(Si),
          -Ci(x) + I * Si(x) - I * pi / 2,
          x,
      )
  
      assert mytn(
          expint(2, x),
          expint(2, x).rewrite(Ei).rewrite(expint),
          -x * E1(x) + exp(-x),
          x,
      )
      assert mytn(
          expint(3, x),
          expint(3, x).rewrite(Ei).rewrite(expint),
          x**2 * E1(x) / 2 + (1 - x) * exp(-x) / 2,
          x,
      )
  
      assert expint(Rational(3, 2), z).nseries(
          z
      ) == 2 + 2 * z - z**2 / 3 + z**3 / 15 - z**4 / 84 + z**5 / 540 - 2 * sqrt(
          pi
      ) * sqrt(
          z
      ) + O(
          z**6
      )
  
      assert E1(z).series(z) == -EulerGamma - log(
          z
      ) + z - z**2 / 4 + z**3 / 18 - z**4 / 96 + z**5 / 600 + O(
          z**6
      )
  
      assert expint(4, z).series(z) == Rational(
          1, 3
      ) - z / 2 + z**2 / 2 + z**3 * (
          log(z) / 6 - Rational(11, 36) + EulerGamma / 6 - I * pi / 6
      ) - z**4 / 24 + z**5 / 240 + O(
          z**6
      )
  
      assert (
          expint(n, x).series(x, oo, n=3)
          == (n * (n + 1) / x**2 - n / x + 1 + O(x ** (-3), (x, oo)))
          * exp(-x)
          / x
      )
  
      assert expint(z, y).series(z, 0, 2) == exp(-y) / y - z * meijerg(
          ((), (1, 1)), ((0, 0, 1), ()), y
      ) / y + O(z**2)
      raises(ArgumentIndexError, lambda: expint(x, y).fdiff(3))
  
      neg = Symbol("neg", negative=True)
      assert Ei(neg).rewrite(Si) == Shi(neg) + Chi(neg) - I * pi
  
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 20 for calling a global function with example usage: test_expint() without return types