Testing symbolic expressions with sympy