code: def test_hotflip_max_flips_multi_input(self):
      config = {
          **_CONFIG_REGRESSION,
          hotflip.MAX_FLIPS_KEY: 1,
          hotflip.NUM_EXAMPLES_KEY: 20,
      }
      ex = _STSB_EXAMPLE
      ex_output = list(self.regression_model.predict([ex]))[0]
      ex_tokens1 = ex_output["tokens_sentence1"]
      ex_tokens2 = ex_output["tokens_sentence2"]
      cfs = self.hotflip.generate(
          ex, self.regression_model, None, config
      )
      for cf in cfs:
          # Number of flips in each field should be no more than MAX_FLIPS.
          cf_tokens1 = cf["tokens_sentence1"]
          cf_tokens2 = cf["tokens_sentence2"]
          self.assertLessEqual(
              sum(
                  [
                      1
                      for i, t in enumerate(cf_tokens1)
                      if t != ex_tokens1[i]
                  ]
              ),
              1,
          )
          self.assertLessEqual(
              sum(
                  [
                      1
                      for i, t in enumerate(cf_tokens2)
                      if t != ex_tokens2[i]
                  ]
              ),
              1,
          )
  
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 8 for calling the HotflipIntegrationTest obj's underlying member method code with example usage: obj.test_hotflip_max_flips_multi_input() without return types