class_docstr: This is a large test due to the moments computation taking some time.
class_docstr_tok: ["This","is","a","large","test","due","to","the","moments","computation","taking","some","time","."]
code: def _Sampler(
      self,
      num,
      counts,
      probs,
      dtype,
      gen=None,
      sample_shape=None,
      seed=None,
  ):
      def func():
          shape = [10 * num] if sample_shape is None else sample_shape
          generator = (
              gen
              if gen is not None
              else (stateful_random_ops.Generator.from_seed(seed))
          )
          return generator.binomial(
              shape=shape, counts=counts, probs=probs, dtype=dtype
          )
  
      return func
  
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.kernel_tests.random import util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import stateful_random_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 1 for calling the RandomBinomialTest obj's underlying member method code with example usage: obj._Sampler(num, counts, probs, dtype, gen, sample_shape, seed) and returns: func, generator