code: def test_early_stop_divergence_threshold_max(self) -> None:
      # Loss does not exceed threshold, patience is high
      losses = [0.2, 0.3, 0.38, 0.4, 0.3, 0.1]
      es1 = EarlyStopChecker("max", 6, divergence_threshold=-0.05)
      es2 = EarlyStopChecker("max", 6, divergence_threshold=-0.05)
  
      for loss in losses:
          should_stop = es1.check(torch.tensor(loss))
          self.assertFalse(should_stop)
          should_stop = es2.check(torch.tensor(loss))
          self.assertFalse(should_stop)
  
      # Loss drops below threshold when patience remaining = 4
      should_stop = es1.check(torch.tensor(-0.06))
      self.assertTrue(should_stop)
  
      # Execution continues with patience remaining = 4
      should_stop = es2.check(torch.tensor(-0.03))
      self.assertFalse(should_stop)
      # Loss drops below threshold with patience remaining = 3
      should_stop = es2.check(torch.tensor(-0.06))
      self.assertTrue(should_stop)
  
imports: import unittest
  import torch
  from torchtnt.utils.early_stop_checker import EarlyStopChecker
label_desc: Use image node_id 12 for calling the EarlyStopCheckerTest obj's underlying member method code with example usage: obj.test_early_stop_divergence_threshold_max() without return types