code: def test_variability_value(self):
      # test value is -0.5 * [1 * log(e / (1+e)) + 1 * log(e^2 / (e^2 + 1))]
      with self.cached_session():
          # [0,1,0] 2/3 , 1/3 4/9
          # [0,0,0] 1, 0 0
          predicted = [[0, 1, 0], [1, 1, 1]]
  
          computed_variability = variability(predicted, nrater=3)
          self.assertAlmostEqual(
              computed_variability[0].eval(), 4.0 / 9.0
          )
  
file_path: NiftyNet/tests/loss_classification_multi_test.py
imports: from __future__ import absolute_import, print_function
  import numpy
  import tensorflow
  from niftynet.layer.loss_classification_multi import LossFunction, variability
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 1 for calling the VariabilityTests obj's underlying member method code with example usage: obj.test_variability_value() without return types