code: def test_median(self):
      should_stop = check_should_stop(
          mode="median", performance_history=[1, 2, 1, 2, 1, 2, 1, 2, 3]
      )
      self.assertTrue(should_stop)
      should_stop = check_should_stop(
          mode="median",
          performance_history=[1, 2, 1, 2, 1, 2, 1, 2, 3, 0],
      )
      self.assertFalse(should_stop)
  
file_path: NiftyNet/tests/handler_early_stopping_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  import numpy
  from niftynet.engine.handler_early_stopping import check_should_stop
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 3 for calling the EarlyStopperTest obj's underlying member method code with example usage: obj.test_median() without return types