code: def test_weakly_connected_components(self):
      for G, C in self.gc:
          U = G.to_undirected()
          w = {frozenset(g) for g in nx.weakly_connected_components(G)}
          c = {frozenset(g) for g in nx.connected_components(U)}
          assert w == c
  
file_path: networkx/networkx/algorithms/components/tests/test_weakly_connected.py
imports: import pytest
  import networkx
  from networkx import NetworkXNotImplemented
label_desc: Use image node_id 2 for calling the TestWeaklyConnected obj's underlying member method code with example usage: obj.test_weakly_connected_components() without return types