code: def test_init_invalid_config(self):
      with self.assertRaisesRegex(
          ValueError,
          "Invalid configuration encountered: "
          'Either "patience" or "threshold" must be enabled.',
      ):
          EarlyStopping(self.get_metric(), patience=-1, threshold=-1)
  
imports: import unittest
  from small_text.training.early_stopping import EarlyStopping, NoopEarlyStopping, EarlyStoppingAndCondition, EarlyStoppingOrCondition
  from small_text.training.metrics import Metric
label_desc: Use image node_id 1 for calling the GeneralEarlyStoppingTest obj's underlying member method code with example usage: obj.test_init_invalid_config() without return types