code: def test_erf_series():
      assert erf(x).series(x, 0, 7) == 2 * x / sqrt(
          pi
      ) - 2 * x**3 / 3 / sqrt(pi) + x**5 / 5 / sqrt(pi) + O(x**7)
  
      assert (
          erf(x).series(x, oo)
          == -exp(-(x**2))
          * (
              3 / (4 * x**5)
              - 1 / (2 * x**3)
              + 1 / x
              + O(x ** (-6), (x, oo))
          )
          / sqrt(pi)
          + 1
      )
      assert (
          erf(x**2).series(x, oo, n=8)
          == (-1 / (2 * x**6) + x ** (-2) + O(x ** (-8), (x, oo)))
          * exp(-(x**4))
          / sqrt(pi)
          * -1
          + 1
      )
      assert (
          erf(sqrt(x)).series(x, oo, n=3)
          == (
              sqrt(1 / x)
              - (1 / x) ** (S(3) / 2) / 2
              + 3 * (1 / x) ** (S(5) / 2) / 4
              + O(x ** (-3), (x, oo))
          )
          * exp(-x)
          / sqrt(pi)
          * -1
          + 1
      )
  
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 2 for calling a global function with example usage: test_erf_series() without return types