code: def prde_spde(a, b, Q, n, DE):
      """
      Special Polynomial Differential Equation algorithm: Parametric Version.
  
      Explanation
      ===========
  
      Given a derivation D on k[t], an integer n, and a, b, q1, ..., qm in k[t]
      with deg(a) > 0 and gcd(a, b) == 1, return (A, B, Q, R, n1), with
      Qq = [q1, ..., qm] and R = [r1, ..., rm], such that for any solution
      c1, ..., cm in Const(k) and q in k[t] of degree at most n of
      a*Dq + b*q == Sum(ci*gi, (i, 1, m)), p = (q - Sum(ci*ri, (i, 1, m)))/a has
      degree at most n1 and satisfies A*Dp + B*p == Sum(ci*qi, (i, 1, m))
      """
      R, Z = list(zip(*[gcdex_diophantine(b, a, qi) for qi in Q]))
  
      A = a
      B = b + derivation(a, DE)
      Qq = [zi - derivation(ri, DE) for ri, zi in zip(R, Z)]
      R = list(R)
      n1 = n - a.degree(DE.t)
  
      return (A, B, Qq, R, n1)
  
imports: import itertools
  from functools import reduce
  from sympy.core.intfunc import ilcm
  from sympy.core import Dummy, Add, Mul, Pow, S
  from sympy.integrals.rde import order_at, order_at_oo, weak_normalizer, bound_degree
  from sympy.integrals.risch import gcdex_diophantine, frac_in, derivation, residue_reduce, splitfactor, residue_reduce_derivation, DecrementLevel, recognize_log_derivative
  from sympy.polys import Poly, lcm, cancel, sqf_list
  from sympy.polys.polymatrix import PolyMatrix
  from sympy.solvers import solve
label_desc: Use image node_id 7 for calling a global function with example usage: prde_spde(a, b, Q, n, DE) and returns: A,  B,  Qq,  R,  n1