def METHOD_NAME(network, cluster=None):
    r"""
    Find the size of the cluster to which each pore belongs
    Parameters
    ----------
    network : dict
        The Network
    cluster : str, optional
        Dict key pointing to the array containing the cluster number of each
        pore.  If not provided then it will be calculated.
    Returns
    -------
    cluster_size : ndarray
        An Np-long array containing the size of the cluster to which each pore
        belongs
    """
    if cluster is None:
        from scipy.sparse import csgraph as csg
        am = network.create_adjacency_matrix(fmt='coo', triu=True)
        N, cluster_num = csg.connected_components(am, directed=False)
    else:
        cluster_num = network[cluster]
    Cs, ind, N = np.unique(cluster_num, return_inverse=True, return_counts=True)
    values = N[ind]
    return values