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 source nodes and compute their t-weights.
  
  Parameters
  ----------
  source_nodes : sequence of integers
      Declare the source nodes via their ids.
  
  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
  -----
  It does not get checked if one of the supplied source-nodes already has
  a weight assigned (e.g. by passing it to `set_sink_nodes`). This can
  occur when the foreground- and background-markers cover the same region. In this
  case the order of setting the terminal nodes can affect the graph and therefore
  the graph-cut result.
docstr_tok: ["Set","multiple","source","nodes","and","compute","their","t-weights",".","Parameters","--","--","--","--","--","source_nodes",":","sequence","of","integers","Declare","the","source","nodes","via","their","ids",".","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","--","--","-","It","does","not","get","checked","if","one","of","the","supplied","source-nodes","already","has","a","weight","assigned","(","e.g",".","by","passing","it","to","`","set_sink_nodes","`",")",".","This","can","occur","when","the","foreground-","and","background-markers","cover","the","same","region",".","In","this","case","the","order","of","setting","the","terminal","nodes","can","affect","the","graph","and","therefore","the","graph-cut","result","."]
code: def set_source_nodes(self, source_nodes):
      r"""
      Set multiple source nodes and compute their t-weights.
  
      Parameters
      ----------
      source_nodes : sequence of integers
          Declare the source nodes via their ids.
  
      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
      -----
      It does not get checked if one of the supplied source-nodes already has
      a weight assigned (e.g. by passing it to `set_sink_nodes`). This can
      occur when the foreground- and background-markers cover the same region. In this
      case the order of setting the terminal nodes can affect the graph and therefore
      the graph-cut result.
      """
      if max(source_nodes) >= self.__nodes or min(source_nodes) < 0:
          raise ValueError(
              "Invalid node id of {} or {}. Valid values are 0 to {}.".format(
                  max(source_nodes), min(source_nodes), self.__nodes - 1
              )
          )
      # set the source-to-node weights (t-weights)
      for snode in source_nodes:
          self.__graph.add_tweights(int(snode), self.MAX, 0)
  
imports: from .maxflow import GraphDouble, GraphFloat
label_desc: Use image node_id 2 for calling the GCGraph obj's underlying member method code with example usage: obj.set_source_nodes(source_nodes) without return types