code: def testBatchedLasVegasAlgorithm(self):
      seed = test_util.test_seed(sampler_type="stateless")
  
      def uniform_less_than_point_five(seed):
          values = samplers.uniform([6], seed=seed)
          negative_values = -values
          good = tf.less(values, 0.5)
  
          return ((negative_values, values), good)
  
      ((negative_values, values), _, _) = self.evaluate(
          brs.batched_las_vegas_algorithm(
              uniform_less_than_point_five, seed=seed
          )
      )
  
      self.assertAllLess(values, 0.5)
      self.assertAllClose(-values, negative_values)
  
      # Check for reproducibility.
      ((negative_values_2, values_2), _, _) = self.evaluate(
          brs.batched_las_vegas_algorithm(
              uniform_less_than_point_five, seed=seed
          )
      )
      self.assertAllEqual(negative_values, negative_values_2)
      self.assertAllEqual(values, values_2)
  
file_path: probability/tensorflow_probability/python/internal/batched_rejection_sampler_test.py
imports: from absl.testing import parameterized
  import numpy
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.internal import batched_rejection_sampler
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling the BatchedRejectionSamplerTest obj's underlying member method code with example usage: obj.testBatchedLasVegasAlgorithm() and returns: negative_values,  values,  good