code: def testSampleActsLikeSampleN(self):
      with self.cached_session() as sess:
          p = [0.2, 0.6]
          dist = bernoulli.Bernoulli(probs=p)
          n = 1000
          seed = 42
          self.assertAllEqual(
              self.evaluate(dist.sample(n, seed)),
              self.evaluate(dist.sample(n, seed)),
          )
          n = array_ops.placeholder(dtypes.int32)
          sample1, sample2 = sess.run(
              [dist.sample(n, seed), dist.sample(n, seed)],
              feed_dict={n: 1000},
          )
          self.assertAllEqual(sample1, sample2)
  
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 18 for calling the BernoulliTest obj's underlying member method code with example usage: obj.testSampleActsLikeSampleN() without return types