code: def random_binomial(p):
      with tf.name_scope("random-binomial"):
          samples = (
              tf.random_uniform(tf.shape(p), dtype=tf.float32) <= p
          )
          return tf.cast(samples, tf.float32)
  
imports: import numpy
  import tensorflow
  from neupy.core.config import DumpableObject
  from neupy.core.properties import IntProperty, ParameterProperty
  from neupy.algorithms.base import BaseNetwork
  from neupy.utils import asfloat, format_data, dot, iters, tf_utils
  from neupy import init
label_desc: Use image node_id 1 for calling a global function with example usage: random_binomial(p) and returns: tf