code: def testSampleXLA(self):
      self.skip_if_no_xla()
      if not tf.executing_eagerly():
          return  # jit_compile is eager-only.
      probs = np.random.rand(4, 3).astype(np.float32)
      counts = np.float32([4, 11.0, 20.0])
      dist = binomial_lib.Binomial(
          total_count=counts, probs=probs, validate_args=True
      )
      # Verify the compile succeeds going all the way through the distribution.
      self.evaluate(
          tf.function(
              lambda: dist.sample(5, seed=test_util.test_seed()),
              jit_compile=True,
          )()
      )
      # Also test the low-level sampler and verify the XLA-friendly variant.
      _, runtime = self.evaluate(
          tf.function(binomial_lib._random_binomial, jit_compile=True)(
              shape=[],
              counts=tf.constant(10.0),
              probs=tf.constant(0.5),
              seed=test_util.test_seed(),
          )
      )
      self.assertEqual(
          implementation_selection._RUNTIME_DEFAULT, runtime
      )
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import binomial
  from tensorflow_probability.python.internal import implementation_selection
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 3 for calling the BinomialSamplingTest obj's underlying member method code with example usage: obj.testSampleXLA() without return types