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 a single t-weight / terminal-weight.
  
  Parameters
  ----------
  node : int
      Node-id for which to set the terminal weights.
  weight_source : float
      Weight to source terminal.
  weight_sink : float
      Weight to sink terminal.
  
  Raises
  ------
  ValueError
      If a passed node id does not refer to any node of the graph
      (i.e. it is either higher than the initially set number of
      nodes or lower than zero).
      
  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.
        
  Terminal weights can be zero or negative.
docstr_tok: ["Set","a","single","t-weight","\/","terminal-weight",".","Parameters","--","--","--","--","--","node",":","int","Node-id","for","which","to","set","the","terminal","weights",".","weight_source",":","float","Weight","to","source","terminal",".","weight_sink",":","float","Weight","to","sink","terminal",".","Raises","--","--","--","ValueError","If","a","passed","node","id","does","not","refer","to","any","node","of","the","graph","(","i.e",".","it","is","either","higher","than","the","initially","set","number","of","nodes","or","lower","than","zero",")",".","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",".","Terminal","weights","can","be","zero","or","negative","."]
code: def set_tweight(self, node, weight_source, weight_sink):
      r"""
      Set a single t-weight / terminal-weight.
  
      Parameters
      ----------
      node : int
          Node-id for which to set the terminal weights.
      weight_source : float
          Weight to source terminal.
      weight_sink : float
          Weight to sink terminal.
  
      Raises
      ------
      ValueError
          If a passed node id does not refer to any node of the graph
          (i.e. it is either higher than the initially set number of
          nodes or lower than zero).
  
      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.
  
      Terminal weights can be zero or negative.
      """
      if node >= self.__nodes or node < 0:
          raise ValueError(
              "Invalid node id of {}. Valid values are 0 to {}.".format(
                  node, self.__nodes - 1
              )
          )
      self.__graph.add_tweights(
          int(node), float(weight_source), float(weight_sink)
      )
  
imports: from .maxflow import GraphDouble, GraphFloat
label_desc: Use image node_id 6 for calling the GCGraph obj's underlying member method code with example usage: obj.set_tweight(node, weight_source, weight_sink) without return types