For the network visualization, I used graphviz and the python module also called graphviz. For the prime decomposition, I used factorint from sympy.ntheory. It looks like a powerful function, which ...
$${\color{Gray}f({\color{Emerald}a},{\color{Orange}b}) = \sin({\color{Emerald}a} + {\color{Orange}b})}$$ You can use .getGrad along with a node name to get the ...