code: def test_bad_input_bits_raises(self):
      with self.assertRaisesRegexp(
          TypeError, "cannot be a TensorFlow value"
      ):
          stages_impl.BitpackingEncodingStage(
              tf.constant(1, dtype=tf.int32)
          )
      with self.assertRaisesRegexp(ValueError, "between 1 and 16"):
          stages_impl.BitpackingEncodingStage(0)
      with self.assertRaisesRegexp(ValueError, "between 1 and 16"):
          stages_impl.BitpackingEncodingStage(17)
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.stages import stages_impl
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.testing import test_utils
label_desc: Use image node_id 10 for calling the BitpackingEncodingStageTest obj's underlying member method code with example usage: obj.test_bad_input_bits_raises() without return types