class_docstr: Bernoulli distribution.
  
  The Bernoulli distribution with `probs` parameter, i.e., the probability of a
  `1` outcome (vs a `0` outcome).
class_docstr_tok: ["Bernoulli","distribution",".","The","Bernoulli","distribution","with","`","probs","`","parameter",",","i.e.",",","the","probability","of","a","`","1","`","outcome","(","vs","a","`","0","`","outcome",")","."]
code: def _sample_n(self, n, seed=None):
      probs = self._probs_parameter_no_checks()
      new_shape = ps.concat([[n], ps.shape(probs)], 0)
      uniform = samplers.uniform(
          new_shape, seed=seed, dtype=probs.dtype
      )
      sample = tf.less(uniform, probs)
      return tf.cast(sample, self.dtype)
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
label_desc: Use image node_id 7 for calling the Bernoulli obj's underlying member method code with example usage: obj._sample_n(n, seed) and returns: tf