a WeightedPartition object has a number of helper functions that could be useful here
.node_degree_by_community(node) -> list of weighted_degree for node in each community
.get_node_community(node) -> identifies a node community
.degree_within_community() -> for each community, sum of within_community weights

you can create a WeightedPartition from a binary adjacency graph so this would still work (weights for all edges are 1)