code: def test_early_stop_float(self) -> None:
      # Same as previous test but with floats
      losses = [0.4, 0.3, 0.28, 0.25, 0.26, 0.25]
      es1 = EarlyStopChecker("min", 3)
      es2 = EarlyStopChecker("min", 4)
  
      for loss in losses:
          should_stop = es1.check(loss)
          self.assertFalse(should_stop)
          should_stop = es2.check(loss)
          self.assertFalse(should_stop)
  
      # Patience should run out
      should_stop = es1.check(0.25)
      self.assertTrue(should_stop)
  
      # es2 has more patience than es1
      should_stop = es2.check(0.25)
      self.assertFalse(should_stop)
      should_stop = es2.check(0.25)
      self.assertTrue(should_stop)
  
      # floats should be converted to tensors
      self.assertTrue(torch.is_tensor(es2._best_value))
  
imports: import unittest
  import torch
  from torchtnt.utils.early_stop_checker import EarlyStopChecker
label_desc: Use image node_id 2 for calling the EarlyStopCheckerTest obj's underlying member method code with example usage: obj.test_early_stop_float() without return types