code: def test_preflow_push_global_relabel_freq():
      G = nx.DiGraph()
      G.add_edge(1, 2, capacity=1)
      R = preflow_push(G, 1, 2, global_relabel_freq=None)
      assert R.graph["flow_value"] == 1
      pytest.raises(
          nx.NetworkXError,
          preflow_push,
          G,
          1,
          2,
          global_relabel_freq=-1,
      )
  
imports: import pytest
  import networkx
  from networkx.algorithms.flow import boykov_kolmogorov, build_flow_dict, build_residual_network, dinitz, edmonds_karp, preflow_push, shortest_augmenting_path
label_desc: Use image node_id 5 for calling a global function with example usage: test_preflow_push_global_relabel_freq() without return types