def is_partition(G, communities):
    # Alternate implementation:
    #
    #     return (len(G) == sum(len(c) for c in community) and
    #             set(G) == set.union(*community))
    #
    return all(sum(1 if v in c else 0 for c in communities) == 1 for v in G)
pragma_arg : NUMBER
dataset/ETHPy150Open networkx/networkx/networkx/algorithms/community/community_utils.py/is_partition--crossover with--dataset/ETHPy150Open nucleic/enaml/enaml/core/parser.py/p_pragma_arg2