class_docstr: A graph representation that works directly with the maxflow.GraphDouble graph as
  base. It is therefore less flexible as graph.Graph, but leads to lower memory
  requirements.
  
  The graph contains nodes, edges (directed) between the nodes (n-edges), edges
  between two terminals (called source and sink) and the nodes (t-edges), and a
  weight for each edge. 
  
  Notes
  -----
  The node-ids used by the graph are assumed to start with 0 and be
  continuous. This is not actually checked, so be careful.
  
  This wrapper tries to catch the most usual exception that can occur in the
  underlying C++ implementation and to convert them into catchable and meaningful
  error messages.
docstr: Set multiple n-weights / edge-weights.
  
  Parameters
  ----------
  nweights : dict
      A dictionary with (node-id, node-id) tuples as keys and (weight-a-to-b, weight-b-to-a) as values.
  
  Notes
  -----
  The object does not check if the number of supplied edges in total exceeds
  the number passed to the init-method. If this is the case, the underlying
  C++ implementation will double the memory, which is very inefficient.
        
  See `set_nweight` for raised errors.
docstr_tok: ["Set","multiple","n-weights","\/","edge-weights",".","Parameters","--","--","--","--","--","nweights",":","dict","A","dictionary","with","(","node-id",",","node-id",")","tuples","as","keys","and","(","weight-a-to-b",",","weight-b-to-a",")","as","values",".","Notes","--","--","-","The","object","does","not","check","if","the","number","of","supplied","edges","in","total","exceeds","the","number","passed","to","the","init-method",".","If","this","is","the","case",",","the","underlying","C++","implementation","will","double","the","memory",",","which","is","very","inefficient",".","See","`","set_nweight","`","for","raised","errors","."]
code: def set_nweights(self, nweights):
      r"""
      Set multiple n-weights / edge-weights.
  
      Parameters
      ----------
      nweights : dict
          A dictionary with (node-id, node-id) tuples as keys and (weight-a-to-b, weight-b-to-a) as values.
  
      Notes
      -----
      The object does not check if the number of supplied edges in total exceeds
      the number passed to the init-method. If this is the case, the underlying
      C++ implementation will double the memory, which is very inefficient.
  
      See `set_nweight` for raised errors.
      """
      for edge, weight in list(nweights.items()):
          self.set_nweight(edge[0], edge[1], weight[0], weight[1])
  
imports: from .maxflow import GraphDouble, GraphFloat
label_desc: Use image node_id 5 for calling the GCGraph obj's underlying member method code with example usage: obj.set_nweights(nweights) without return types