code: def _binomial_subtree_acceptance_batched(
      num_states_in_subtree, num_states, seed_stream
  ):
      with tf.name_scope("binomial_subtree_acceptance_batched"):
          batch_size = tf.shape(input=num_states_in_subtree)[0]
          return _random_bernoulli(
              [batch_size],
              probs=tf.minimum(
                  tf.cast(num_states_in_subtree, dtype=tf.float32)
                  / tf.cast(num_states, dtype=tf.float32),
                  1.0,
              ),
              dtype=tf.bool,
              seed=seed_stream(),
          )
  
imports: import collections
  import functools
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python import random
  from tensorflow_probability.python.experimental import auto_batching
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.mcmc import kernel
  from tensorflow_probability.python.util.seed_stream import SeedStream
label_desc: Use image node_id 13 for calling a global function with example usage: _binomial_subtree_acceptance_batched(num_states_in_subtree, num_states, seed_stream) and returns: _random_bernoulli