code: def test_select_with_early_stopping(self):
      model_selection = ModelSelection()
      measured_values_list = [
          {
              "val_loss": 0.043,
              "val_acc": 0.78,
              "train_loss": 0.023,
              "train_acc": 0.85,
          },
          {
              "val_loss": 0.031,
              "val_acc": 0.77,
              "train_loss": 0.018,
              "train_acc": 0.85,
          },
          {
              "val_loss": 0.032,
              "val_acc": 0.78,
              "train_loss": 0.016,
              "train_acc": 0.85,
          },
          {
              "val_loss": 0.031,
              "val_acc": 0.79,
              "train_loss": 0.020,
              "train_acc": 0.85,
          },
      ]
      fields = [
          {ModelSelection.FIELD_NAME_EARLY_STOPPING: False},
          {ModelSelection.FIELD_NAME_EARLY_STOPPING: False},
          {ModelSelection.FIELD_NAME_EARLY_STOPPING: False},
          {ModelSelection.FIELD_NAME_EARLY_STOPPING: True},
      ]
  
      for i, measured_values in enumerate(measured_values_list):
          model_selection.add_model(
              str(i + 1),
              f"/any/path/to/model_{i+1}.bin",
              measured_values,
              fields=fields[i],
          )
  
      model_selection_result = model_selection.select()
  
      self.assertEqual(4, len(model_selection_result.measured_values))
      for key, val in measured_values_list[1].items():
          self.assertEqual(
              val, model_selection_result.measured_values[key]
          )
  
      self.assertEqual(1, len(model_selection_result.fields))
      self.assertFalse(
          model_selection_result.fields[
              ModelSelection.FIELD_NAME_EARLY_STOPPING
          ]
      )
  
imports: import unittest
  from small_text.training.metrics import Metric
  from small_text.training.model_selection import ModelSelectionResult, ModelSelection, NoopModelSelection
label_desc: Use image node_id 17 for calling the ModelSelectionTest obj's underlying member method code with example usage: obj.test_select_with_early_stopping() without return types