code: def test_hierarchy_1():
      G = nx.DiGraph()
      G.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 1), (3, 4), (0, 4)])
      assert nx.flow_hierarchy(G) == 0.5
  
imports: import pytest
  import networkx
label_desc: Use image node_id 4 for calling a global function with example usage: test_hierarchy_1() without return types