code: def testPmfCorrectBroadcastDynamicShape(self):
      with self.cached_session():
          p = array_ops.placeholder(dtype=dtypes.float32)
          dist = bernoulli.Bernoulli(probs=p)
          event1 = [1, 0, 1]
          event2 = [[1, 0, 1]]
          self.assertAllClose(
              dist.prob(event1).eval({p: [0.2, 0.3, 0.4]}),
              [0.2, 0.7, 0.4],
          )
          self.assertAllClose(
              dist.prob(event2).eval({p: [0.2, 0.3, 0.4]}),
              [[0.2, 0.7, 0.4]],
          )
  
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 7 for calling the BernoulliTest obj's underlying member method code with example usage: obj.testPmfCorrectBroadcastDynamicShape() without return types