code: def test_early_stop_median(self):
      mutex = Lock()
  
      def callback(*args):
          mutex.acquire()
          self.val = -1
          mutex.release()
  
      self.rm.policy = "median"
      job_5 = Job("task5.py", BasicConfig({"x": 5}), "./tests/data")
      job_5.jid = 1
      self.rm.run_job(job_5, 1, {}, callback)
      self.rm.finish()
  
      self.assertDictEqual(
          self.rm.interm_job_res, {1: [6.0, 7.0, 8.0, 9.0, 10.0, 11.0]}
      )
      self.assertEqual(self.val, -1)
  
imports: import unittest
  import mockssh
  import tempfile
  import pdb
  from shutil import copyfile
  from time import sleep
  from six import PY2
  import pkg_resources
  from aup.EE.Resource.SSHResourceManager import *
  from aup.EE.Job import Job
  from aup import BasicConfig
  from aup.Proposer import RandomProposer
  from aup.utils import get_default_connector
  from threading import Lock
label_desc: Use image node_id 3 for calling the AsyncSSHResourceManagerEarlyStopTestCase obj's underlying member method code with example usage: obj.test_early_stop_median() without return types