docstr: Checks that the communities computed from the given graph ``G``
  using the :func:`~networkx.asyn_lpa_communities` function match
  the set of nodes given in ``expected``.
  
  ``expected`` must be a :class:`set` of :class:`frozenset`
  instances, each element of which is a node in the graph.
docstr_tok: ["Checks","that","the","communities","computed","from","the","given","graph","``","G","``","using","the",":","func",":","`","~networkx.asyn_lpa_communities","`","function","match","the","set","of","nodes","given","in","``","expected","``",".","``","expected","``","must","be","a",":","class",":","`","set","`","of",":","class",":","`","frozenset","`","instances",",","each","element","of","which","is","a","node","in","the","graph","."]
code: def _check_communities(self, G, expected):
      """Checks that the communities computed from the given graph ``G``
      using the :func:`~networkx.asyn_lpa_communities` function match
      the set of nodes given in ``expected``.
  
      ``expected`` must be a :class:`set` of :class:`frozenset`
      instances, each element of which is a node in the graph.
  
      """
      communities = nx.community.asyn_lpa_communities(G)
      result = {frozenset(c) for c in communities}
      assert result == expected
  
imports: from itertools import chain, combinations
  import pytest
  import networkx
label_desc: Use image node_id 1 for calling the TestAsynLpaCommunities obj's underlying member method code with example usage: obj._check_communities(G, expected) without return types