code: def test_hierarchy_exception():
      G = nx.cycle_graph(5)
      pytest.raises(nx.NetworkXError, nx.flow_hierarchy, G)
  
imports: import pytest
  import networkx
label_desc: Use image node_id 1 for calling a global function with example usage: test_hierarchy_exception() without return types