code: def test_is_weakly_connected_empty_graph_raises():
      G = nx.DiGraph()
      with pytest.raises(
          nx.NetworkXPointlessConcept, match="Connectivity is undefined"
      ):
          nx.is_weakly_connected(G)
  
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 1 for calling a global function with example usage: test_is_weakly_connected_empty_graph_raises() without return types