callgraph = pydot.Dot(graph_type='digraph', fontname='Verdana', compound='true'
    )
cluster_foo = pydot.Cluster('foo', label='foo')
callgraph.add_subgraph(cluster_foo)
Edges between two subgraphs in pydot