code: def testPmfShapes(self):
      with self.cached_session():
          p = array_ops.placeholder(dtypes.float32, shape=[None, 1])
          dist = bernoulli.Bernoulli(probs=p)
          self.assertEqual(
              2, len(dist.log_prob(1).eval({p: [[0.5], [0.5]]}).shape)
          )
  
          dist = bernoulli.Bernoulli(probs=0.5)
          self.assertEqual(
              2, len(self.evaluate(dist.log_prob([[1], [1]])).shape)
          )
  
          dist = bernoulli.Bernoulli(probs=0.5)
          self.assertEqual((), dist.log_prob(1).get_shape())
          self.assertEqual((1), dist.log_prob([1]).get_shape())
          self.assertEqual(
              (2, 1), dist.log_prob([[1], [1]]).get_shape()
          )
  
          dist = bernoulli.Bernoulli(probs=[[0.5], [0.5]])
          self.assertEqual((2, 1), dist.log_prob(1).get_shape())
  
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 12 for calling the BernoulliTest obj's underlying member method code with example usage: obj.testPmfShapes() without return types