http://pycallgraph.slowchop.com/en/master/
I don't remember much, but I think this wasn't terribly useful at the time, because it became very messy very quickly. Any moderately complicated application will be calling a dozen functions, and the graph then becomes a gigantic mess of interconnected nodes which is very hard to read.But like I said, it was ages ago, so I don't know how good/bad it is now.
https://www.selenic.com/blog/?p=626
In rust, there's cargo-graph to do this for your packages:
https://github.com/kbknapp/cargo-graph
I used that on Servo once see PNG at https://dirkjan.ochtman.nl/files/servo-graph.png or SVG at https://dirkjan.ochtman.nl/files/servo-graph.svg.
From these explorations, I think the four color theorem-type planarity or connectedness is actually less important than a lack of cycles for the perceived complexity, or the difficulty encountered due to that complexity.