code: def testInvalidP(self):
      invalid_ps = [1.01, 2.0]
      for p in invalid_ps:
          with self.assertRaisesOpError(
              "probs has components greater than 1"
          ):
              dist = bernoulli.Bernoulli(probs=p, validate_args=True)
              self.evaluate(dist.probs)
  
      invalid_ps = [-0.01, -3.0]
      for p in invalid_ps:
          with self.assertRaisesOpError("Condition x >= 0"):
              dist = bernoulli.Bernoulli(probs=p, validate_args=True)
              self.evaluate(dist.probs)
  
      valid_ps = [0.0, 0.5, 1.0]
      for p in valid_ps:
          dist = bernoulli.Bernoulli(probs=p)
          self.assertEqual(p, self.evaluate(dist.probs))
  
imports: import importlib
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops.distributions import bernoulli
  from tensorflow.python.ops.distributions import kullback_leibler
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 3 for calling the BernoulliTest obj's underlying member method code with example usage: obj.testInvalidP() without return types