class_docstr: Wrapper around GCGraph, disabling its main functionalities to enable checking of the received values.
docstr: Original graph sums if edges already exists.
docstr_tok: ["Original","graph","sums","if","edges","already","exists","."]
code: def set_nweight(self, node_from, node_to, weight_there, weight_back):
      """Original graph sums if edges already exists."""
      # print (node_from, node_to, weight_there, weight_back)
      if not (node_from, node_to) in self.__nweights:
          self.__nweights[(node_from, node_to)] = (
              weight_there,
              weight_back,
          )
      else:
          weight_there_old, weight_back_old = self.__nweights[
              (node_from, node_to)
          ]
          self.__nweights[(node_from, node_to)] = (
              weight_there_old + weight_there,
              weight_back_old + weight_back,
          )
  
imports: import sys
  import math
  import unittest
  import scipy
  import numpy
  from numpy.testing import assert_raises
  from medpy.graphcut.energy_label import boundary_stawiaski, boundary_difference_of_means, boundary_stawiaski_directed, regional_atlas
  from medpy.graphcut.graph import GCGraph
label_desc: Use image node_id 2 for calling the GCGraphTest obj's underlying member method code with example usage: obj.set_nweight(node_from, node_to, weight_there, weight_back) without return types