code: def test_max_length_criteria(self):
      criteria = MaxLengthCriteria(max_length=10)
  
      input_ids, scores = self._get_tensors(5)
      self.assertFalse(criteria(input_ids, scores))
  
      input_ids, scores = self._get_tensors(9)
      self.assertFalse(criteria(input_ids, scores))
  
      input_ids, scores = self._get_tensors(10)
      self.assertTrue(criteria(input_ids, scores))
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/tests/generation/test_generation_stopping_criteria.py
imports: import time
  import unittest
  from transformers import is_torch_available
  from transformers.testing_utils import require_torch, torch_device
  from ..test_modeling_common import ids_tensor
label_desc: Use image node_id 3 for calling the StoppingCriteriaTestCase obj's underlying member method code with example usage: obj.test_max_length_criteria() without return types