code: def t_binomial(mean, size, const_size, var_input, input, steps, rtol):
      R = MRG_RandomStreams(234)
      u = R.binomial(size=size, p=mean)
      f = theano.function(var_input, u)
      f(*input)
  
      # Increase the number of steps if sizes implies only a few samples
      if np.prod(const_size) < 10:
          steps_ = steps * 100
      else:
          steps_ = steps
      basictest(
          f,
          steps_,
          const_size,
          prefix="mrg  cpu",
          inputs=input,
          allow_01=True,
          target_avg=mean,
          mean_rtol=rtol,
      )
  
      RR = theano.tensor.shared_randomstreams.RandomStreams(234)
  
      uu = RR.binomial(size=size, p=mean)
      ff = theano.function(var_input, uu)
      # It's not our problem if numpy generates 0 or 1
      basictest(
          ff,
          steps_,
          const_size,
          prefix="numpy",
          allow_01=True,
          inputs=input,
          target_avg=mean,
          mean_rtol=rtol,
      )
  
imports: from __future__ import absolute_import, print_function, division
  import os
  import sys
  import time
  import unittest
  from nose.tools import assert_raises
  import numpy
  from six.moves import xrange
  import theano
  from theano import change_flags, config, tensor
  from theano.sandbox import rng_mrg
  from theano.sandbox.rng_mrg import MRG_RandomStreams
  from theano.tests import unittest_tools
  from theano.tests.unittest_tools import attr
label_desc: Use image node_id 10 for calling a global function with example usage: t_binomial(mean, size, const_size, var_input, input, steps, rtol) without return types