code: def make_bernoulli(batch_shape, dtype=dtypes.int32):
      p = np.random.uniform(size=list(batch_shape))
      p = constant_op.constant(p, dtype=dtypes.float32)
      return bernoulli.Bernoulli(probs=p, dtype=dtype)
  
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 2 for calling a global function with example usage: make_bernoulli(batch_shape, dtype) and returns: bernoulli