code: def test_empty():
      with pytest.raises(nx.NetworkXException):
          G = nx.empty_graph()
          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 1 for calling a global function with example usage: test_empty() without return types