code: def bernoulli_sample(mean, shape):
      samples = tf.random_uniform(
          shape, minval=0, maxval=1, dtype=tf.float32
      )
      sign_samples = tf.sign(mean - samples)
      return (sign_samples + 1) / 2
  
file_path: neupy/neupy/layers/stochastic.py
imports: import tensorflow
  from neupy.utils import asfloat
  from neupy.exceptions import LayerConnectionError
  from neupy.core.properties import ProperFractionProperty, NumberProperty, TypedListProperty
  from .base import Identity
label_desc: Use image node_id 1 for calling a global function with example usage: bernoulli_sample(mean, shape) and returns: unknown