code: def test_processor_list(self):
      batch_size = 4
      sequence_length = 10
      vocab_size = 15
      eos_token_id = 2
      bos_token_id = 1
      max_length = 15
  
      # dummy input_ids and scores
      input_ids = ids_tensor((batch_size, sequence_length), vocab_size)
      input_ids_comp = input_ids.copy()
  
      scores = self._get_uniform_logits(batch_size, vocab_size)
      scores_comp = scores.copy()
  
      # instantiate all dist processors
      temp_dist_warp = FlaxTemperatureLogitsWarper(temperature=0.5)
      top_k_warp = FlaxTopKLogitsWarper(3)
      top_p_warp = FlaxTopPLogitsWarper(0.8)
  
      # instantiate all logits processors
      min_dist_proc = FlaxMinLengthLogitsProcessor(
          min_length=10, eos_token_id=eos_token_id
      )
      bos_dist_proc = FlaxForcedBOSTokenLogitsProcessor(
          bos_token_id=bos_token_id
      )
      eos_dist_proc = FlaxForcedEOSTokenLogitsProcessor(
          max_length=max_length, eos_token_id=eos_token_id
      )
  
      cur_len = 10
  
      # no processor list
      scores = temp_dist_warp(input_ids, scores, cur_len=cur_len)
      scores = top_k_warp(input_ids, scores, cur_len=cur_len)
      scores = top_p_warp(input_ids, scores, cur_len=cur_len)
      scores = min_dist_proc(input_ids, scores, cur_len=cur_len)
      scores = bos_dist_proc(input_ids, scores, cur_len=cur_len)
      scores = eos_dist_proc(input_ids, scores, cur_len=cur_len)
  
      # with processor list
      processor = FlaxLogitsProcessorList(
          [
              temp_dist_warp,
              top_k_warp,
              top_p_warp,
              min_dist_proc,
              bos_dist_proc,
              eos_dist_proc,
          ]
      )
      scores_comp = processor(input_ids, scores_comp, cur_len=cur_len)
  
      # scores should be equal
      self.assertTrue(jnp.allclose(scores, scores_comp, atol=1e-3))
  
      # input_ids should never be changed
      self.assertListEqual(input_ids.tolist(), input_ids_comp.tolist())
  
file_path: transformers/tests/generation/test_flax_logits_process.py
imports: import unittest
  import numpy
  from transformers import is_flax_available
  from transformers.testing_utils import require_flax
  from ..test_modeling_flax_common import ids_tensor
label_desc: Use image node_id 8 for calling the LogitsProcessorTest obj's underlying member method code with example usage: obj.test_processor_list() without return types