class_docstr: Test for PerChannelUniformQuantizationEncodingStage.
class_docstr_tok: ["Test","for","PerChannelUniformQuantizationEncodingStage","."]
code: def test_stochastic_tensor_raises(self):
      with self.assertRaisesRegexp(TypeError, "stochastic"):
          quantization.PerChannelUniformQuantizationEncodingStage(
              stochastic=tf.constant(True, dtype=tf.bool)
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.stages.research import quantization
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.testing import test_utils
label_desc: Use image node_id 11 for calling the PerChannelUniformQuantizationEncodingStageTest obj's underlying member method code with example usage: obj.test_stochastic_tensor_raises() without return types