code: def testSampleN(self):
      prob = [0.2, 0.6]
      dist = continuous_bernoulli.ContinuousBernoulli(
          probs=prob, validate_args=True
      )
      n = 100000
      samples = dist.sample(n, seed=test_util.test_seed())
      tensorshape_util.set_shape(samples, [n, 2])
      self.assertEqual(samples.dtype, tf.float32)
      sample_values = self.evaluate(samples)
      self.assertTrue(np.all(sample_values > 0))
      self.assertTrue(np.all(sample_values < 1))
      # This  tolerance is very sensitive to the value of prob as well as n.
      self.assertAllClose(
          mean(np.array(prob, dtype=np.float32)),
          np.mean(sample_values, axis=0),
          atol=1e-2,
      )
      # In this test we're just interested in verifying there isn't a crash
      # owing to mismatched types. b/30940152
      dist = continuous_bernoulli.ContinuousBernoulli(
          np.log([0.2, 0.4]), validate_args=True
      )
      x = dist.sample(1, seed=test_util.test_seed())
      self.assertAllEqual((1, 2), tensorshape_util.as_list(x.shape))
  
imports: import numpy
  from scipy import special
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import continuous_bernoulli
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 17 for calling the ContinuousBernoulliTest obj's underlying member method code with example usage: obj.testSampleN() without return types