code: def test_disconnected_raises():
      G = nx.ladder_graph(3)
      G.add_node("a")
      with pytest.raises(nx.NetworkXError, match=".*not connected"):
          nx.bipartite.maximal_extendability(G)
  
file_path: networkx/networkx/algorithms/bipartite/tests/test_extendability.py
imports: import pytest
  import networkx
label_desc: Use image node_id 2 for calling a global function with example usage: test_disconnected_raises() without return types