code: def test_min_length_dist_processor(self):
      vocab_size = 20
      batch_size = 4
      eos_token_id = 0
  
      min_dist_processor = FlaxMinLengthLogitsProcessor(
          min_length=10, eos_token_id=eos_token_id
      )
  
      # check that min length is applied at length 5
      input_ids = ids_tensor((batch_size, 20), vocab_size=20)
      cur_len = 5
      scores = self._get_uniform_logits(batch_size, vocab_size)
      scores_before_min_length = min_dist_processor(
          input_ids, scores, cur_len=cur_len
      )
      self.assertListEqual(
          scores_before_min_length[:, eos_token_id].tolist(),
          4 * [-float("inf")],
      )
  
      # check that min length is not applied anymore at length 15
      scores = self._get_uniform_logits(batch_size, vocab_size)
      cur_len = 15
      scores_before_min_length = min_dist_processor(
          input_ids, scores, cur_len=cur_len
      )
      self.assertFalse(jnp.isinf(scores_before_min_length).any())
  
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 5 for calling the LogitsProcessorTest obj's underlying member method code with example usage: obj.test_min_length_dist_processor() without return types