docs: def set_nweight(self, node_from, node_to, weight_there, weight_back):
          r"""
          Set a single n-weight / edge-weight.
          
          Parameters
          ----------
          node_from : int
              Node-id from the first node of the edge.
          node_to : int
              Node-id from the second node of the edge.
          weight_there : float
              Weight from first to second node (>0). 
          weight_back : float
              Weight from second to first node (>0).
          
          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).
          ValueError
              If the two node-ids of the edge are the same (graph cut does
              not allow self-edges).
          ValueError
              If one of the passed weights is <= 0.
              
          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 unefficient.
          
          The underlying C++ implementation allows zero weights, but these are highly
          undesirable for inter-node weights and therefore raise an error.
          """
          if node_from >= self.__nodes or node_from < 0:
              raise ValueError('Invalid node id (node_from) of {}. Valid values are 0 to {}.'.format(node_from, self.__nodes - 1))
          elif node_to >= self.__nodes or node_to < 0:
              raise ValueError('Invalid node id (node_to) of {}. Valid values are 0 to {}.'.format(node_to, self.__nodes - 1))
          elif node_from == node_to:
              raise ValueError('The node_from ({}) can not be equal to the node_to ({}) (self-connections are forbidden in graph cuts).'.format(node_from, node_to))
          elif weight_there <= 0 or weight_back <= 0:
              raise ValueError('Negative or zero weights are not allowed.')
          self.__graph.sum_edge(int(node_from), int(node_to), float(weight_there), float(weight_back))