class_docstr: Measurement of work before the global relabeling heuristic should be
  applied.
class_docstr_tok: ["Measurement","of","work","before","the","global","relabeling","heuristic","should","be","applied","."]
code: def __init__(self, n, m, freq):
      self._threshold = (n + m) / freq if freq else float("inf")
      self._work = 0
  
file_path: networkx/networkx/algorithms/flow/utils.py
imports: from collections import deque
  import networkx
label_desc: Use image node_id 1 to create a new GlobalRelabelThreshold object  with example: obj = GlobalRelabelThreshold(n, m, freq)