code: def test_stop(self):
      stopping_criterion = DeltaFScore(2, threshold=0.15)
  
      first_predictions = np.array([0, 1, 1, 0, 1, 1, 0])
      second_predictions = np.array([0, 1, 1, 1, 1, 1, 0])
      third_predictions = np.array([1, 1, 1, 1, 1, 1, 0])
      fourth_predictions = np.array([1, 1, 1, 0, 1, 1, 0])
  
      stopping_criterion.stop(predictions=first_predictions)
  
      self.assertFalse(
          stopping_criterion.stop(predictions=second_predictions)
      )
      assert_array_almost_equal(
          [0.111111], stopping_criterion.delta_history
      )
      assert_array_equal(
          second_predictions, stopping_criterion.last_predictions
      )
  
      self.assertFalse(
          stopping_criterion.stop(predictions=third_predictions)
      )
      assert_array_almost_equal(
          [0.111111, 0.090909], stopping_criterion.delta_history
      )
      assert_array_equal(
          third_predictions, stopping_criterion.last_predictions
      )
  
      self.assertTrue(
          stopping_criterion.stop(predictions=fourth_predictions)
      )
      assert_array_almost_equal(
          [0.111111, 0.090909, 0.090909],
          stopping_criterion.delta_history,
      )
      assert_array_equal(
          fourth_predictions, stopping_criterion.last_predictions
      )
  
file_path: small-text/tests/unit/small_text/stopping_criteria/test_base.py
imports: import unittest
  import numpy
  from numpy.testing import assert_array_equal, assert_array_almost_equal
  from small_text.stopping_criteria.base import DeltaFScore
label_desc: Use image node_id 6 for calling the DeltaFScoreTest obj's underlying member method code with example usage: obj.test_stop() without return types