code: def test_input_types(self):
      # For consistency across different places the DisjunctiveConstraint is called,
      # dc.token_ids is a list of integers. It is also initialized only by integers.
  
      cset = [[1, 2, 4], [1, 2, 3, 4]]
      dc = DisjunctiveConstraint(cset)
      self.assertTrue(isinstance(dc.token_ids, list))
  
      with self.assertRaises(ValueError):
          DisjunctiveConstraint(
              torch.LongTensor([[1, 2, 4], [1, 2, 3]])
          )
  
      with self.assertRaises(ValueError):
          DisjunctiveConstraint(
              [
                  torch.LongTensor([1, 2, 4]),
                  torch.LongTensor([1, 2, 3, 4, 5]),
              ]
          )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/tests/generation/test_generation_beam_constraints.py
imports: import unittest
  from transformers import is_torch_available
  from transformers.testing_utils import require_torch
label_desc: Use image node_id 1 for calling the ConstraintTest obj's underlying member method code with example usage: obj.test_input_types() without return types