class_docstr: Bernoulli Distribution.
  
  The probability mass function of the distribution is expressed as
  
  .. math::
      P(x = 1; p) = p \\
      P(x = 0; p) = 1 - p
  
  Args:
      p(:class:`~chainer.Variable` or :ref:`ndarray`): Parameter of
          distribution representing :math:`p`. Either `p` or `logit` (not
          both) must have a value.
      logit(:class:`~chainer.Variable` or :ref:`ndarray`) Parameter of
          distribution representing :math:`\log\{p/(1-p)\}`. Either `p`
          or `logit` (not both) must have a value.
code: def batch_shape(self):
      return self.p.shape
  
imports: import numpy
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import distribution
  import chainer.distributions.utils
  from chainer.functions.activation import sigmoid
  from chainer.functions.array import where
  from chainer.functions.math import exponential
  from chainer.functions.math import logarithm_1p
  from chainer.functions.math import sum
  from chainer import utils
  from chainer.utils import cache
label_desc: Use image node_id 4 for calling the Bernoulli obj's underlying member method code with example usage: obj.batch_shape() and returns: self