code: def make_call_graph(func, *args, **kwargs):
      
      from pycallgraph import PyCallGraph
      from pycallgraph.output import GraphvizOutput
      with PyCallGraph(output=GraphvizOutput):
          func(*args, **kwargs)
docs: profile with pycallgraph
  
      Example:
          pycallgraph graphviz -- ./mypythonscript.py
  
      References:
          http://pycallgraph.slowchop.com/en/master/