code: def test_early_stop_invalid_mode(self) -> None:
      # Check for invalid mode
      with self.assertRaisesRegex(ValueError, "Got `invalid`"):
          # pyre-fixme[6]: For 1st argument expected
          #  `Union[typing_extensions.Literal['max'],
          #  typing_extensions.Literal['min']]` but got
          #  `typing_extensions.Literal['invalid']`.
          EarlyStopChecker("invalid", 3)
  
imports: import unittest
  import torch
  from torchtnt.utils.early_stop_checker import EarlyStopChecker
label_desc: Use image node_id 15 for calling the EarlyStopCheckerTest obj's underlying member method code with example usage: obj.test_early_stop_invalid_mode() without return types