code: def test_hotflip_max_flips(self):
      config = {
          **_CONFIG_CLASSIFICATION,
          hotflip.MAX_FLIPS_KEY: 1,
          hotflip.NUM_EXAMPLES_KEY: 1,
      }
      ex = _SST2_EXAMPLE
  
      ex_output = list(self.classification_model.predict([ex]))[0]
      ex_tokens = ex_output["tokens_sentence"]
      cfs_1 = self.hotflip.generate(
          ex, self.classification_model, None, config
      )
      cf_tokens = list(cfs_1)[0]["tokens_sentence"]
  
      ex = {"sentence": "this long movie is terrible and horrible."}
      cfs_2 = self.hotflip.generate(
          ex, self.classification_model, None, config
      )
  
      self.assertEqual(
          1,
          sum(
              [1 for i, t in enumerate(cf_tokens) if t != ex_tokens[i]]
          ),
      )
      self.assertEmpty(cfs_2)
  
file_path: lit/lit_nlp/components/hotflip_int_test.py
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from lit_nlp.components import hotflip
  from lit_nlp.examples.models import glue_models
  import numpy
  from lit_nlp.lib import file_cache
label_desc: Use image node_id 7 for calling the HotflipIntegrationTest obj's underlying member method code with example usage: obj.test_hotflip_max_flips() without return types