code: def test_non_connected():
      with pytest.raises(nx.NetworkXException):
          G = nx.Graph()
          G.add_node(0)
          G.add_node(1)
          nx.second_order_centrality(G)
  
file_path: networkx/networkx/algorithms/centrality/tests/test_second_order_centrality.py
imports: import pytest
  import networkx
label_desc: Use image node_id 2 for calling a global function with example usage: test_non_connected() without return types