code: def test_bessely_series():
      const = 2 * S.EulerGamma / pi - 2 * log(2) / pi + 2 * log(x) / pi
      assert bessely(0, x).series(x, n=4) == const + x**2 * (
          -log(x) / (2 * pi)
          + (2 - 2 * S.EulerGamma) / (4 * pi)
          + log(2) / (2 * pi)
      ) + O(x**4 * log(x))
      assert bessely(1, x).series(x, n=4) == -2 / (pi * x) + x * (
          log(x) / pi - log(2) / pi - (1 - 2 * S.EulerGamma) / (2 * pi)
      ) + x**3 * (
          -log(x) / (8 * pi)
          + (S(5) / 2 - 2 * S.EulerGamma) / (16 * pi)
          + log(2) / (8 * pi)
      ) + O(
          x**4 * log(x)
      )
      assert bessely(2, x).series(x, n=4) == -4 / (
          pi * x**2
      ) - 1 / pi + x**2 * (
          log(x) / (4 * pi)
          - log(2) / (4 * pi)
          - (S(3) / 2 - 2 * S.EulerGamma) / (8 * pi)
      ) + O(
          x**4 * log(x)
      )
      assert bessely(3, x).series(x, n=4) == -16 / (pi * x**3) - 2 / (
          pi * x
      ) - x / (4 * pi) + x**3 * (
          log(x) / (24 * pi)
          - log(2) / (24 * pi)
          - (S(11) / 6 - 2 * S.EulerGamma) / (48 * pi)
      ) + O(
          x**4 * log(x)
      )
      assert bessely(0, x ** (1.1)).series(
          x, n=4
      ) == 2 * S.EulerGamma / pi - 2 * log(2) / pi + 2.2 * log(
          x
      ) / pi + x**2.2 * (
          -0.55 * log(x) / pi
          + (2 - 2 * S.EulerGamma) / (4 * pi)
          + log(2) / (2 * pi)
      ) + O(
          x**4 * log(x)
      )
      assert bessely(0, x**2 + x).series(x, n=4) == const - (
          2 - 2 * S.EulerGamma
      ) * (
          -(x**3) / (2 * pi) - x**2 / (4 * pi)
      ) + 2 * x / pi + x**2 * (
          -log(x) / (2 * pi) - 1 / pi + log(2) / (2 * pi)
      ) + x**3 * (
          -log(x) / pi + 1 / (6 * pi) + log(2) / pi
      ) + O(
          x**4 * log(x)
      )
      assert bessely(0, x / (1 - x)).series(
          x, n=3
      ) == const + 2 * x / pi + x**2 * (
          -log(x) / (2 * pi)
          + (2 - 2 * S.EulerGamma) / (4 * pi)
          + log(2) / (2 * pi)
          + 1 / pi
      ) + O(
          x**3 * log(x)
      )
      assert bessely(0, log(1 + x)).series(
          x, n=3
      ) == const - x / pi + x**2 * (
          -log(x) / (2 * pi)
          + (2 - 2 * S.EulerGamma) / (4 * pi)
          + log(2) / (2 * pi)
          + 5 / (12 * pi)
      ) + O(
          x**3 * log(x)
      )
      assert bessely(1, sin(x)).series(x, n=4) == -1 / (
          pi * (-(x**3) / 12 + x / 2)
      ) - (1 - 2 * S.EulerGamma) * (-(x**3) / 12 + x / 2) / pi + x * (
          log(x) / pi - log(2) / pi
      ) + x**3 * (
          -7 * log(x) / (24 * pi)
          - 1 / (6 * pi)
          + (S(5) / 2 - 2 * S.EulerGamma) / (16 * pi)
          + 7 * log(2) / (24 * pi)
      ) + O(
          x**4 * log(x)
      )
      assert bessely(1, 2 * sqrt(x)).series(x, n=3) == -1 / (
          pi * sqrt(x)
      ) + sqrt(x) * (log(x) / pi - (1 - 2 * S.EulerGamma) / pi) + x ** (
          S(3) / 2
      ) * (
          -log(x) / (2 * pi) + (S(5) / 2 - 2 * S.EulerGamma) / (2 * pi)
      ) + x ** (
          S(5) / 2
      ) * (
          log(x) / (12 * pi)
          - (S(10) / 3 - 2 * S.EulerGamma) / (12 * pi)
      ) + O(
          x**3 * log(x)
      )
      assert bessely(-2, sin(x)).series(x, n=4) == bessely(
          2, sin(x)
      ).series(x, n=4)
  
imports: from itertools import product
  from sympy.concrete.summations import Sum
  from sympy.core.function import diff, expand_func
  from sympy.core.numbers import I, Rational, oo, pi
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol, symbols
  from sympy.functions.elementary.complexes import conjugate, polar_lift
  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
  from sympy.functions.special.bessel import besseli, besselj, besselk, bessely, hankel1, hankel2, hn1, hn2, jn, jn_zeros, yn
  from sympy.functions.special.gamma_functions import gamma, uppergamma
  from sympy.functions.special.hyper import hyper
  from sympy.integrals.integrals import Integral
  from sympy.series.order import O
  from sympy.series.series import series
  from sympy.functions.special.bessel import airyai, airybi, airyaiprime, airybiprime, marcumq
  from sympy.core.random import random_complex_number, verify_numerically, test_derivative_numerically, _randint
  from sympy.simplify import besselsimp
  from sympy.testing.pytest import raises, slow
  from sympy.abc import z, n, k, x
label_desc: Use image node_id 8 for calling a global function with example usage: test_bessely_series() without return types