I am looking for a graph theory package in Python or C++ that enables me to create edges between subgraphs/clusters and their nodes at will, as depicted in the accepted answer to this question, to assign properties to all those objects (the nodes, the clusters, the node-node edges, node-cluster edges, cluster-cluster edges), and perform calculations with those properties.
It appears to be impossible in NetworkX. Please note I am not referring to merely drawing these images.
Question: Does iGraph, graph_tool, or some other package offer this feature?