class_docstr: Wrapper around GCGraph, disabling its main functionalities to enable checking of the received values.
docstr: Evaluates the returned results.
docstr_tok: ["Evaluates","the","returned","results","."]
code: def __compare_dictionaries(
      self, unittest, result, expected_result, msg_base=""
  ):
      """Evaluates the returned results."""
      unittest.assertEqual(
          len(expected_result),
          len(result),
          "{}: The expected result dict contains {} entries (for 4-connectedness), instead found {}.".format(
              msg_base, len(expected_result), len(result)
          ),
      )
      for key, value in list(result.items()):
          unittest.assertTrue(
              key in expected_result,
              "{}: Region border {} unexpectedly found in expected results.".format(
                  msg_base, key
              ),
          )
          if key in expected_result:
              unittest.assertAlmostEqual(
                  value[0],
                  expected_result[key][0],
                  msg="{}: Weight for region border {} is {}. Expected {}.".format(
                      msg_base, key, value, expected_result[key]
                  ),
                  delta=sys.float_info.epsilon,
              )
              unittest.assertAlmostEqual(
                  value[1],
                  expected_result[key][1],
                  msg="{}: Weight for region border {} is {}. Expected {}.".format(
                      msg_base, key, value, expected_result[key]
                  ),
                  delta=sys.float_info.epsilon,
              )
              unittest.assertGreater(
                  value[0],
                  0.0,
                  "{}: Encountered a weight {} <= 0.0 for key {}.".format(
                      msg_base, value, key
                  ),
              )
              unittest.assertGreater(
                  value[1],
                  0.0,
                  "{}: Encountered a weight {} <= 0.0 for key {}.".format(
                      msg_base, value, key
                  ),
              )
  
      for key, value in list(expected_result.items()):
          unittest.assertTrue(
              key in result,
              "{}: Region border {} expectedly but not found in results.".format(
                  msg_base, key
              ),
          )
  
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 5 for calling the GCGraphTest obj's underlying member method code with example usage: obj.__compare_dictionaries(unittest, result, expected_result, msg_base) without return types