code: def test_newton():
      R, x = ring("x", QQ)
      p = x**2 - 2
      r = rs_newton(p, x, 4)
      assert r == 8 * x**4 + 4 * x**2 + 2
  
imports: from sympy.polys.domains import QQ, EX, RR
  from sympy.polys.rings import ring
  from sympy.polys.ring_series import _invert_monoms, rs_integrate, rs_trunc, rs_mul, rs_square, rs_pow, _has_constant_term, rs_hadamard_exp, rs_series_from_list, rs_exp, rs_log, rs_newton, rs_series_inversion, rs_compose_add, rs_asin, rs_atan, rs_atanh, rs_tan, rs_cot, rs_sin, rs_cos, rs_cos_sin, rs_sinh, rs_cosh, rs_tanh, _tan1, rs_fun, rs_nth_root, rs_LambertW, rs_series_reversion, rs_is_puiseux, rs_series
  from sympy.testing.pytest import raises, slow
  from sympy.core.symbol import symbols
  from sympy.functions import sin, cos, exp, tan, cot, atan, atanh, tanh, log, sqrt
  from sympy.core.numbers import Rational
  from sympy.core import expand, S
label_desc: Use image node_id 13 for calling a global function with example usage: test_newton() without return types