docstr: Perfect agreement used to cause nan values.
docstr_tok: ["Perfect","agreement","used","to","cause","nan","values","."]
code: def test_stop_with_perfect_agreement(self):
      """Perfect agreement used to cause nan values."""
  
      stopping_criterion = KappaAverage(2, kappa=0.7)
  
      first_predictions = np.array([1, 1, 1, 1])
      second_predictions = np.array([1, 1, 1, 1])
      third_predictions = np.array([1, 1, 1, 1])
      fourth_predictions = np.array([1, 1, 1, 1])
  
      self.assertFalse(
          stopping_criterion.stop(predictions=first_predictions)
      )
      self.assertFalse(
          stopping_criterion.stop(predictions=second_predictions)
      )
      self.assertFalse(
          stopping_criterion.stop(predictions=third_predictions)
      )
      self.assertTrue(
          stopping_criterion.stop(predictions=fourth_predictions)
      )
  
      self.assertFalse(
          np.any(np.isnan(stopping_criterion.kappa_history))
      )
      assert_array_equal(
          fourth_predictions, stopping_criterion.last_predictions
      )
  
imports: import unittest
  import numpy
  from numpy.testing import assert_array_equal
  from small_text.stopping_criteria.kappa import KappaAverage, _adapted_cohen_kappa_score
label_desc: Use image node_id 6 for calling the KappaAverageTest obj's underlying member method code with example usage: obj.test_stop_with_perfect_agreement() without return types