code: def test_diff():
      x, y = symbols("x, y")
      R, Dx = DifferentialOperators(ZZ.old_poly_ring(x), "Dx")
      p = HolonomicFunction(x * Dx**2 + 1, x, 0, [0, 1])
      assert p.diff().to_expr() == p.to_expr().diff().simplify()
      p = HolonomicFunction(Dx**2 - 1, x, 0, [1, 0])
      assert p.diff(x, 2).to_expr() == p.to_expr()
      p = expr_to_holonomic(Si(x))
      assert p.diff().to_expr() == sin(x) / x
      assert p.diff(y) == 0
      C_0, C_1, C_2, C_3 = symbols("C_0, C_1, C_2, C_3")
      q = Si(x)
      assert p.diff(x).to_expr() == q.diff()
      assert (
          p.diff(x, 2).to_expr().subs(C_0, Rational(-1, 3)).cancel()
          == q.diff(x, 2).cancel()
      )
      assert (
          p.diff(x, 3).series().subs({C_3: Rational(-1, 3), C_0: 0})
          == q.diff(x, 3).series()
      )
  
imports: from sympy.holonomic import DifferentialOperator, HolonomicFunction, DifferentialOperators, from_hyper, from_meijerg, expr_to_holonomic
  from sympy.holonomic.recurrence import RecurrenceOperators, HolonomicSequence
  from sympy.core import EulerGamma
  from sympy.core.numbers import I, Rational, pi
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol, symbols
  from sympy.functions.elementary.exponential import exp, log
  from sympy.functions.elementary.hyperbolic import asinh, cosh
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.functions.elementary.trigonometric import cos, sin
  from sympy.functions.special.bessel import besselj
  from sympy.functions.special.beta_functions import beta
  from sympy.functions.special.error_functions import Ci, Si, erf, erfc
  from sympy.functions.special.gamma_functions import gamma
  from sympy.functions.special.hyper import hyper, meijerg
  from sympy.printing.str import sstr
  from sympy.series.order import O
  from sympy.simplify.hyperexpand import hyperexpand
  from sympy.polys.domains.integerring import ZZ
  from sympy.polys.domains.rationalfield import QQ
  from sympy.polys.domains.realfield import RR
label_desc: Use image node_id 18 for calling a global function with example usage: test_diff() without return types