def cluster_total_volume(adj, c, cluster_num, dict_bool):
    """Determines the volume of a community.

    Parameters
    ----------
    adj : SciPy sparse matrix (csr or csc)
        The N x N rescaled Adjacency matrix constructed from
        N x N adjacency matrix of the graph and scale r.
    c : Integer array
        Array of community labels for the nodes in the graph as ordered
        by the adjacency matrix.
    cluster_num : Integer
        Label of the community of interest.
    dict_bool : dictionary
        Tracks the nodes in each community, with cluster labels as dictionary-
        keys, and the corresponding boolean arrays (c == label) as values.

    Returns
    -------
    float
        Total volume of all nodes in the rescaled topology of
        cluster 'cluster_num'.

    """
    return adj[dict_bool[cluster_num]].sum()
