code: def test_in_equal_should_stop(self):
      state = {
          torchbearer.EPOCH: 1,
          torchbearer.STOP_TRAINING: False,
          torchbearer.METRICS: {"test_metric": 0.001},
      }
  
      stopper = EarlyStopping(monitor="test_metric", mode="min")
  
      stopper.on_start(state)
      stopper.on_end_epoch(state)
  
      self.assertFalse(state[torchbearer.STOP_TRAINING])
  
      stopper.on_end_epoch(state)
  
      self.assertTrue(state[torchbearer.STOP_TRAINING])
  
imports: from unittest import TestCase
  from mock import MagicMock
  import torchbearer
  from torchbearer.callbacks import EarlyStopping
label_desc: Use image node_id 7 for calling the TestEarlyStopping obj's underlying member method code with example usage: obj.test_in_equal_should_stop() without return types